xcandiottix Posted March 10, 2010 Share Posted March 10, 2010 You know on how some forms, the data entry field already has the title of what you should type there and after you click on that entry field the pre-existing text disappears? How is that done in php? EX: [ enter your name ] <form field with preexisting text on mouse click to start typing in the field: [ ] <text disappears If this was flash I would code something like: on mouse click text field "name" = 0 in php i'm not so sure. Any help is greatly appreciated =) Link to comment https://forums.phpfreaks.com/topic/194708-forms-and-deleting-prewritten-text/ Share on other sites More sharing options...
xcandiottix Posted March 10, 2010 Author Share Posted March 10, 2010 Ah. Java will actually do the trick... <input name="Name" type="text" onfocus="if(this.value==this.defaultValue){this.value='';}" value="Your Name" size="37" /><br> Link to comment https://forums.phpfreaks.com/topic/194708-forms-and-deleting-prewritten-text/#findComment-1023968 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.