hi -
i'm goin' mad i tell ya! mad!
i have some "master" radio buttons that control the display of other "slave" radio buttons dynamically.
if i want to reset the form using the standard reset button, all the radio buttons clear out normally, but the slave buttons (displayed using div.style.visibility='hidden or visible') will not clear out. hmmmm...
so i try a custom reset function. i can clear the display of the slave divs, but i can't figure out how to clear out the master radio buttons. when i view (alert()) their values from within the function, they're always undefined. however, if i submit them, their actual values always reach the action page. huh? but true.
here's my custom reset button code:
<input type="button" name="reset" value="Reset" onclick="myreset();">
here's the custom reset function:
function myreset(){
//document.mainform.reset();
mainform.red.checked='false';
mainform.inter.checked='false';
DS3Div.style.visibility='hidden';
OC3Div.style.visibility='hidden';
STMDiv.style.visibility='hidden';
VocSlaveDIV.style.visibility='hidden';
}
document.mainform.reset(); isn't working...
i've tried referring to mainform.red and mainform.inter as document.mainform.red and document.mainform.inter, but it makes no difference...
lost...
i'm goin' mad i tell ya! mad!
i have some "master" radio buttons that control the display of other "slave" radio buttons dynamically.
if i want to reset the form using the standard reset button, all the radio buttons clear out normally, but the slave buttons (displayed using div.style.visibility='hidden or visible') will not clear out. hmmmm...
so i try a custom reset function. i can clear the display of the slave divs, but i can't figure out how to clear out the master radio buttons. when i view (alert()) their values from within the function, they're always undefined. however, if i submit them, their actual values always reach the action page. huh? but true.
here's my custom reset button code:
<input type="button" name="reset" value="Reset" onclick="myreset();">
here's the custom reset function:
function myreset(){
//document.mainform.reset();
mainform.red.checked='false';
mainform.inter.checked='false';
DS3Div.style.visibility='hidden';
OC3Div.style.visibility='hidden';
STMDiv.style.visibility='hidden';
VocSlaveDIV.style.visibility='hidden';
}
document.mainform.reset(); isn't working...
i've tried referring to mainform.red and mainform.inter as document.mainform.red and document.mainform.inter, but it makes no difference...
lost...