Maestro-
05-14-2008, 01:04 AM
I have this script that works nicely, using a <span> i'm able to display or hide the content in it (box form) when a radio button is checked or unchecked.
function Show_Stuff(Click_Menu) {
// Function that will swap the display/no display for
// all content within span tags
if (Click_Menu.style.display == "none") {
Click_Menu.style.display = "";
}
else {
Click_Menu.style.display = "none";
}
}
but i need it to work like Dell's online ordering page, where other radio button with the same input name is checked, the previous will be hidden again. as such, there should only be one display box/content at one time, for the same input name.
i'm a noob and don't know how to edit, but i made an attempt like this.
function Hide_Stuff(Click_Menu) {
// Function that will swap the display/no display for
// all content within span tags
var length;
length = document.form1.radiobutton.length;
for (i=0 ; i < length ; i++ )
if (document.form1.radiobutton[i].checked) {
}
else {
Click_Menu.style.display = "none";
}
}
hide();
function hide() {
setInterval("Hide_Stuff(display1)",500);
setInterval("Hide_Stuff(display2)",500);
setInterval("Hide_Stuff(display3)",500);
}
but it seems to ignore whatever i've clicked, and close all the boxes when the "500" is up.
any help here?
function Show_Stuff(Click_Menu) {
// Function that will swap the display/no display for
// all content within span tags
if (Click_Menu.style.display == "none") {
Click_Menu.style.display = "";
}
else {
Click_Menu.style.display = "none";
}
}
but i need it to work like Dell's online ordering page, where other radio button with the same input name is checked, the previous will be hidden again. as such, there should only be one display box/content at one time, for the same input name.
i'm a noob and don't know how to edit, but i made an attempt like this.
function Hide_Stuff(Click_Menu) {
// Function that will swap the display/no display for
// all content within span tags
var length;
length = document.form1.radiobutton.length;
for (i=0 ; i < length ; i++ )
if (document.form1.radiobutton[i].checked) {
}
else {
Click_Menu.style.display = "none";
}
}
hide();
function hide() {
setInterval("Hide_Stuff(display1)",500);
setInterval("Hide_Stuff(display2)",500);
setInterval("Hide_Stuff(display3)",500);
}
but it seems to ignore whatever i've clicked, and close all the boxes when the "500" is up.
any help here?
