I develop ASP's but am looking for a JavaScript function that will hide a given section of text/images when the page has completed loading. I use the simple function below but section will not "hide" in NN 6. JavaScript: } function NSdisplay(){ document.layer.visibility = "hide"; } HTML: <body bgcolor="#FFFFFF" text="#000000" onLoad="NSdisplay();"> <LAYER id="layer" name="layer"> <img id=picture height="30" src="../images/test.gif" width="140" border="0"></a> <br><br> <table width="90%" border="0" cellspacing="4" cellpadding="0" align="center" height="1"> <tr align="left" valign="top"> <td><b><font id=text face="Verdana, Arial, Helvetica, Sans-Serif" size="3" color="#CC6600">Your application has been submitted.</font></b><br> <font id=text2 face="Verdana, Arial, Helvetica, Sans-Serif" size="3" color="#000000"><STRONG>Please wait while we process your application.</FONT></STRONG> <p><center><IMG id=picture2 height=10 src="../images/timer.gif" width=43></center> </td> </tr> </table> <hr noshade size="1"> </LAYER> Any ideas?? Thanks ...
I'd have to look a bit deeper, but initially, don't call it layer since it tuurns up as a reserved word and browsers get confused easily. Beyond that, you're looking at some fun since the control between EI and NS are very different but you'll need something like this...
Note that I've called the layer "layer0". If you have more problems, we can cover them point by point here, but I'd recommend a good book and an informative web site. (I like O'Reillys Javascript book) Dave. (and I'm no expert, I'm stealing from a solution someone wrote for me ages back ) [This message has been edited by David O'Meara (edited October 29, 2001).]
Hi Jeff, Show/Hide won't work with Netscape 6.x, it uses newer DOM model which is not backward compatible with Netscape 4.x. Here's a cross browser function that'll allow you to show/hide a lyer in most browsers. And yes, as David suggested you need to change name from layer to layer0 or something, and enclose it in a <div>...</div> tag intstead of <layer>...</layer>. Here's the code -
Also have look at this, and see if it is of any help. HTH, - Manish
[This message has been edited by Manish Hatwalne (edited October 29, 2001).]
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.