Chris Raethke
09-05-2000, 02:28 AM
I have got the 7 DIV's hiding/showing by using LAYERS in Netscape and
Explorer
eg. 7 of these, named page01 ... page07
<form id="newuser">
<% if isIE %>
<Div id="page01">
<% else %>
<ILAYER id="page01">
<% end if %>
blah..
blah..
...Some inputs, checkbox's, select's, textarea's...etc
<% if isIE %>
</DIV>
<% else %>
</ILAYER>
<% end if %>
...
...
...
more pages in here
</form>
I am using this function to jump between pages
function goToPage(num){
var i
for (i = 1; i <= 7; i++){
if (i != num) { // Hide all divs except with num ID
if (document.all) // Is it MSIE?
{ document.all.item("page0" + i).style.display = "none"; }
else // It's Netscape Navigator
{ document.layers[i-1].visibility = 'hide'; }//-- don't know NN
equvivalent.
} else { // Show the div with num ID
if (document.all) // Is it MSIE?
{ document.all.item("page0" + num).style.display = "block"; }
else // It's Netscape Navigator
{ document.layers[num-1].visibility = 'show'; }//-- don't know NN
equvivalent.
}
}
}
}
The problem that comes up here is that I cannot have one form stretched over
7 Layer tags, I know I can change the ILAYER to DIV but then how do I refer
to the layers array from netscape ??
Explorer
eg. 7 of these, named page01 ... page07
<form id="newuser">
<% if isIE %>
<Div id="page01">
<% else %>
<ILAYER id="page01">
<% end if %>
blah..
blah..
...Some inputs, checkbox's, select's, textarea's...etc
<% if isIE %>
</DIV>
<% else %>
</ILAYER>
<% end if %>
...
...
...
more pages in here
</form>
I am using this function to jump between pages
function goToPage(num){
var i
for (i = 1; i <= 7; i++){
if (i != num) { // Hide all divs except with num ID
if (document.all) // Is it MSIE?
{ document.all.item("page0" + i).style.display = "none"; }
else // It's Netscape Navigator
{ document.layers[i-1].visibility = 'hide'; }//-- don't know NN
equvivalent.
} else { // Show the div with num ID
if (document.all) // Is it MSIE?
{ document.all.item("page0" + num).style.display = "block"; }
else // It's Netscape Navigator
{ document.layers[num-1].visibility = 'show'; }//-- don't know NN
equvivalent.
}
}
}
}
The problem that comes up here is that I cannot have one form stretched over
7 Layer tags, I know I can change the ILAYER to DIV but then how do I refer
to the layers array from netscape ??