Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Show a row in radio button onclick

Status
Not open for further replies.

dvknn

IS-IT--Management
Mar 11, 2003
94
0
0
US
Hi,

I have 2 rows. In the first row, I have three radio buttons
hs2, hs4, hs6.

In the second row, I have 2 textboxes with labels
HS2 and Description

By default I have hs2 checked. I show HS2 and Description row.

When I click hs4, I want the 'HS2' label to change to HS4 and when I click HS6 radio button, I want the label in the second row to change to HS6.

How can I do this?

- Thanks,
 
so you want to change the name of the text input?
 

Do you mean label as in a real label element:

Code:
<label ...>

or do you simply mean text?

If the latter, use a span around your text and change its firstChild.nodeValue property.

If the former, give the label an id and use that to reference it.

Incidentally, what has changing a label got to do with showing a row?

Hope this helps,
Dan


The answers you get are only as good as the information you give!

 
Do a search for display to find how to make elements appear and disappear. Search for innerHTML or innerText to find how to change the contents of an element.


Tracy Dryden

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard. [dragon]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top