ccm3k
12-31-2001, 02:37 AM
Hi
I need help with the following :
I have a form with a master SELECT element. I want a specific DIV to appear when the user selects an item in the list.
Maybe the code below - which is not working and I do not see why (and it is my problem) - will make it clearer :
(knowing that the select has "onchange=showdiv();"
//begin
var nowdisplayed = 0; // the present displayed div
function showdiv() {
var divselected = documents.forms[0].listtype.value;
var seldiv = eval("searchform-"+divselected)
var hidediv = eval("searchform-"+nowdisplayed)
seldiv.style.visibility = "visible";
hidediv.style.visibility = "hidden";
}
//end
The returned error is "style is Null, etc..."
I do not see what is wrong !
Help please !
Thanks
CCM
I need help with the following :
I have a form with a master SELECT element. I want a specific DIV to appear when the user selects an item in the list.
Maybe the code below - which is not working and I do not see why (and it is my problem) - will make it clearer :
(knowing that the select has "onchange=showdiv();"
//begin
var nowdisplayed = 0; // the present displayed div
function showdiv() {
var divselected = documents.forms[0].listtype.value;
var seldiv = eval("searchform-"+divselected)
var hidediv = eval("searchform-"+nowdisplayed)
seldiv.style.visibility = "visible";
hidediv.style.visibility = "hidden";
}
//end
The returned error is "style is Null, etc..."
I do not see what is wrong !
Help please !
Thanks
CCM