I'm switching between 2 parts of a form, and I don't want the user to do both, so I want to hide the one they aren't using. To do this, I have a radio button. They select one, and the other one is supposed to appear in the first one's place. Well, the problem I'm having, is that whenever I change the POSITION of one, the other will not display. Here's the function I'm using:
// if int
if (c == "int"
{ document.all.step3us.style.position = "absolute";
document.all.step3us.style.visibility = "hidden";
document.all.step3int.style.position = "relative";
document.all.step3int.style.visibility = "visible";
}else
{ document.all.step3int.style.position = "absolute";
document.all.step3int.style.visibility = "hidden";
document.all.step3us.style.position = "relative";
document.all.step3us.style.visibility = "visible";
}
The c variable is passed in as the value of the radio button which will either be "us" or "int".
Is there any way I can get around this problem? I can't seem to figure it out. Oh, and the items are DIVs if that means anything.
Thanks.
Cid
ciddivine@yahoo.com
// if int
if (c == "int"
{ document.all.step3us.style.position = "absolute";
document.all.step3us.style.visibility = "hidden";
document.all.step3int.style.position = "relative";
document.all.step3int.style.visibility = "visible";
}else
{ document.all.step3int.style.position = "absolute";
document.all.step3int.style.visibility = "hidden";
document.all.step3us.style.position = "relative";
document.all.step3us.style.visibility = "visible";
}
The c variable is passed in as the value of the radio button which will either be "us" or "int".
Is there any way I can get around this problem? I can't seem to figure it out. Oh, and the items are DIVs if that means anything.
Thanks.
Cid
ciddivine@yahoo.com