New to all this, so coding is probably a bit rough, but help with the concept would be appreciated. Am trying to set up a page where a click will increase the size of one layer and hide the others. A click reverses that. Works (written diferently) in NS6.0 and IE and the functions (resizeTo and moveTo) and hide/show work in NS4 until combined. Then the layers refuse to hide/show! This is the code less the script tags and the actual layers (which are in the body).
function maximise(width,height,x,y){
document.content.resizeTo(800,1000);
document.content.moveTo(45,0);
document.title.visibility="hide";
document.content2.visibility="hide";
document.menu.visibility="hide";
document.blank.visibility="hide";
document.maxDiv.visibility="show";
document.minDiv.visibility="show";
document.navy1.visibility="show";
document.yellow.visibility="show";
document.navy2.visibility="show";
document.red2.visibility="show";
}
function minimise(width,height,x,y){
document.content.resizeTo(600,300);
document.content.moveTo(140,190);
document.title.visibility="show";
document.content2.visibility="show";
document.menu.visibility="show";
document.blank.visibility="show";
document.maxDiv.visibility="hide";
document.minDiv.visibility="hide";
document.navy1.visibility="hide";
document.yellow.visibility="hide";
document.navy2.visibility="hide";
document.red2.visibility="hide";
}
Have tried document.layers.(layername)=hide/show.
Have tried styling visibility in the layer tag as well (that works via style sheet in IE) but in NS4 the visibility won't toggle if I do that. Have also tried ilayers - no help, and also divs/spans for the containers that don't move, just need to hide/show - and they just glare at me!
Hide/show works until I combine it with the move/resize function ..... possible reasons?
Any ideas would be great!!
function maximise(width,height,x,y){
document.content.resizeTo(800,1000);
document.content.moveTo(45,0);
document.title.visibility="hide";
document.content2.visibility="hide";
document.menu.visibility="hide";
document.blank.visibility="hide";
document.maxDiv.visibility="show";
document.minDiv.visibility="show";
document.navy1.visibility="show";
document.yellow.visibility="show";
document.navy2.visibility="show";
document.red2.visibility="show";
}
function minimise(width,height,x,y){
document.content.resizeTo(600,300);
document.content.moveTo(140,190);
document.title.visibility="show";
document.content2.visibility="show";
document.menu.visibility="show";
document.blank.visibility="show";
document.maxDiv.visibility="hide";
document.minDiv.visibility="hide";
document.navy1.visibility="hide";
document.yellow.visibility="hide";
document.navy2.visibility="hide";
document.red2.visibility="hide";
}
Have tried document.layers.(layername)=hide/show.
Have tried styling visibility in the layer tag as well (that works via style sheet in IE) but in NS4 the visibility won't toggle if I do that. Have also tried ilayers - no help, and also divs/spans for the containers that don't move, just need to hide/show - and they just glare at me!
Hide/show works until I combine it with the move/resize function ..... possible reasons?
Any ideas would be great!!