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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Visibility Problem

Status
Not open for further replies.

wood

MIS
Aug 3, 2000
139
CA
I am trying to set up one of my pages so that if the user clicks on a radio button, a text box dissappears. If the user clicks on another radio button, that same text box reappears.

Can anyone help me with my problem?

Here is what I am trying:

function terms(formObj){
with (formObj){
if (elements[87].checked == true){
elements[88].visibility = "show";
}
else{
elements[88].visibility = "hide";
}
}
}
 
what problem are you experiencing? jared@aauser.com
 
The code that I currently have does not hide or show the text box. What I am trying to do is just that, make the text box appear or disappear if the user clicks on different radio buttons.
 
if you're using IE then you need to change the visibility to either 'visible' or 'hidden'. 'show' and 'hide' are for netscape only, and I don't think you can hide thows elements like that at all in NS, you'd probably have to use layers, but I'm not a NS guru :) jared@aauser.com
 
jaredn is correct. Also you address the 'visibility' property differently in IE from NS.

In IE it is a property of the 'style' property of the element:

elements[88].style.visibility = ...;

while in NS I think jaredn is correct, you go through the 'layer' object to access 'visibility'. I also am not versed in the NS object unmodel. B-)

-pete
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top