liamloveslearning Posted May 14, 2008 Share Posted May 14, 2008 Hi, Im not sure if this is in the correct category so i apologize in advance; My problem I feel has an easy solution im just coming unstuck trying to find it, I have a form on my webpage which contains initial values, like examples of what people will be able to type in there; Now what I want is for when people click in the text area I would like the initial value to dissapear; ive seen it done somewhere before Im just not sure what i'd google; Thanks for any help Link to comment https://forums.phpfreaks.com/topic/105591-solved-initial-value-text-area/ Share on other sites More sharing options...
Xurion Posted May 14, 2008 Share Posted May 14, 2008 <input type="text" name="myfield" value="Initial Value" onFocus="this.value=''" /> You'd have to put an if statement if you only wanted it to clear the field if it said 'Initial Value'. Link to comment https://forums.phpfreaks.com/topic/105591-solved-initial-value-text-area/#findComment-540992 Share on other sites More sharing options...
liamloveslearning Posted May 15, 2008 Author Share Posted May 15, 2008 ahh thanks alot its worked Link to comment https://forums.phpfreaks.com/topic/105591-solved-initial-value-text-area/#findComment-542097 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.