Forums

This topic is locked

How do i set the initial values in text areas

Posted 15 Jun 2004 15:56:34
1
has voted
15 Jun 2004 15:56:34 ian mc posted:
Sorry, Just one other thing ... How do i set the initial values in text areas to disapear on click.

At the moment it is:
<textarea name="Address" id="textarea">Address</textarea>

Replies

Replied 15 Jun 2004 16:47:12
15 Jun 2004 16:47:12 Dave Thomas replied:
whats the difference in this to your last question?

the answer i gave you for that is also the solution for this, if you dont want the text to reappear remove the onBlur code

Regards,
Dave

<img src="www.nova-cs.co.uk/DmxAvatar.jpg" border="0">

[DWMX 2004]|[FlashMX 2004 Pro]|[Studio MX 2004]|[SQL]|[Access2000/2002]|[ASP/VBScript]|[XP-Pro]
Replied 15 Jun 2004 19:27:23
15 Jun 2004 19:27:23 ian mc replied:
Sorry Dave, the solution yopu gave me last time works really well, but when i applied it to a text area rather than a text field it wouldn't work and i got teh following appear in the text area - \br

How do i modify
&lt;textarea name="textarea"&gt;&lt;/textarea&gt;
to do the same ?
Replied 15 Jun 2004 20:13:23
15 Jun 2004 20:13:23 Dave Thomas replied:
tried and tested

<pre id=code><font face=courier size=2 id=code>
&lt;textarea name="textarea1" onfocus="if(this.value=='Your Comments here...')this.value='';" onblur="if(this.value=='')this.value='Your Comments here...';" value="Your Comments here..."&gt;Your Comments here...&lt;/textarea&gt;
</font id=code></pre id=code>

Regards,
Dave

<img src="www.nova-cs.co.uk/DmxAvatar.jpg" border="0">

[DWMX 2004]|[FlashMX 2004 Pro]|[Studio MX 2004]|[SQL]|[Access2000/2002]|[ASP/VBScript]|[XP-Pro]
Replied 15 Jun 2004 20:50:39
15 Jun 2004 20:50:39 ian mc replied:
Cheers Dave, Thanks again for all your help.

Regards,
Ian.

Reply to this topic