Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Span/Div in netscape

Status
Not open for further replies.

donniea21

MIS
Feb 16, 2001
75
0
0
US
I have the following code in my html page:
<INPUT TYPE=&quot;submit&quot; VALUE=&quot;Upload&quot;
onClick=&quot;if (submenu1.style.display == 'none') submenu1.style.display = ''; else submenu1.style.display = 'none';&quot;>

<span id=&quot;submenu1&quot; style=&quot;display:absolute&quot;>
Uploading...Please Wait.
</span>

Is there a way to make this compatible with Netscape? Thanks.
 
Do a browser check and if it's netscape, use layer instead of span/div.

Rick if(($question==&quot;has been bugging me&quot;
AND $answer==&quot;fixed the problem&quot;) OR $answer==&quot;really good post&quot;){
print(&quot;Star&quot;);
}else{
print(&quot;Thanks.&quot;);
}
 
NO!! layers are ONLY compatible with NS4x!

I would ignore NS4...for IE5+ or NS6+ use document.getElementById():

<INPUT TYPE=&quot;submit&quot; VALUE=&quot;Upload&quot;
onClick=&quot;if (document.getElementById('submenu1').style.display == 'none') {document.getElementById('submenu1').style.display = ''} else document.getElementById('submenu1').style.display = 'none';&quot;>


if you must support NS4, you'll have to use layers.
=========================================================
if (!succeed) try();
-jeff
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top