dynamic label change

M

mail2madhur

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
 
D

David Dorward

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-Level-1-19981001/ecma-script-language-binding.html
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,431
Messages
2,571,679
Members
48,796
Latest member
Greg L.

Latest Threads

Top