By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,732 Members | 863 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,732 IT Pros & Developers. It's quick & easy.

dynamic label change

P: n/a
I need to display different text on label on click of button.
<table>
<tr>
<td> ?????</td>
</tr>
<tr>
<td>
<TEXTAREA id="notesId" name="notesdescDisplay" rows=12 cols=83
value=""></TEXTAREA>
</td>
</tr>
</table>
Question 1. what should be used at place of ???? for dynamic chnage of
label i.e label tag or anything else
Question 2. is it necessary to provide "for" attribute for label ? also
textarea in in different <TR> so will it make any difference if label
attribute if set to textarea id.
Question 3. please soultion whcih will work for IE, mozilla and
netscape

thanks in advance.

mady

Mar 2 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
ma*********@gmail.com wrote:
I need to display different text on label on click of button.
That sounds dubious. Why?
Question 1. what should be used at place of ???? for dynamic chnage of
label i.e label tag or anything else
Label should be fine (assuming you are using it as such).
Question 2. is it necessary to provide "for" attribute for label?
Yes. Support for implicit labelling (i.e. having the form control inside the
label element) is rather weak and ...
also textarea in in different <TR>
.... you can't do that anyway.
Question 3. please soultion whcih will work for IE, mozilla and
netscape


You probably want createTextNode and replaceChild.
http://www.w3.org/TR/1998/REC-DOM-Le...e-binding.html

--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
Mar 2 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.