• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Junilu Lacar
  • Liutauras Vilda
Sheriffs:
  • Paul Clapham
  • Jeanne Boyarsky
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
Bartenders:
  • Jesse Duncan
  • Frits Walraven
  • Mikalai Zaikin

NetScape 6 show/hide

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ...
 
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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).]
 
j tomaszewski
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the help Dave.
Jeff.
 
Ranch Hand
Posts: 2596
Android Firefox Browser Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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).]
 
pie. tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic