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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Works in IE but not in Netscape...

Status
Not open for further replies.

Yogi39

Technical User
Jun 20, 2001
273
CA
Code:
<SCRIPT LANGUAGE=javascript>
<!--
function show(){

if ( document.all)
document.all(&quot;object1&quot;).style.visibility = &quot;visible&quot;, 
document.all(&quot;object2&quot;).style.visibility = &quot;visible&quot;, 
document.all(&quot;object3&quot;).style.visibility = &quot;hidden&quot;;
else
document.object1.visibility = &quot;show&quot;, 
document.object2.visibility = &quot;show&quot;,
document.object3.visibility = &quot;hide&quot;;
}
//-->
</SCRIPT>

</head>

<body>
<div id=&quot;object1&quot; style=&quot;position:absolute;visibility:hidden ; left:280px; top:40px ; z-index:2&quot;>

<table width=130 border=0 cellspacing=5 cellpadding=0>
<tr>
<td><p><font color=&quot;#FF9900&quot; size=&quot;4&quot;>Menu</font></p></td>
</tr>
<tr>
<td><a href=&quot;[URL unfurl="true"]http://www.123webmaster.com&quot;[/URL] ><b><font color=&quot;#00FF00&quot; size=&quot;3&quot;>Blah</font></b></a></td>
</tr>
</table>
</div>

<p>               </p>
<p> </p>

<div id=object3 style=&quot;position:absolute; left:280px; top:240px ; z-index:2&quot;>
<p><a href=&quot;&quot; onmouseover=&quot;show()&quot;><font color=&quot;#FF9900&quot; size=&quot;7&quot;>           PLAY</font</a></p>
</a>
</div>



<div id=&quot;object2&quot; style=&quot;position:absolute;visibility:hidden ; left:80px; top:40px ; z-index:2&quot;>

<table width=130 border=0 cellspacing=5 cellpadding=0>
<tr>
<td><img border=&quot;0&quot; src=&quot;Images/Game.jpg&quot; </td 
</tr width=&quot;100&quot; height=&quot;73&quot;>

</table>
</div>
 
You don't actualy tell what is not working? The function or the the table or what?

I also can not check it from here.
I only see in the last row of the table:
</tr width=&quot;100&quot; height=&quot;73&quot;>

Shouldn't the width and height being set in the <tr> or <td> ?

Erik
 
Your only problem was invalid html. I cleaned it up an it works. Here you go:

Code:
<html>
<Head>
<title>ff</title>
<SCRIPT LANGUAGE=javascript>
<!--
function show(){

if ( document.all)
document.all(&quot;object1&quot;).style.visibility = &quot;visible&quot;,
document.all(&quot;object2&quot;).style.visibility = &quot;visible&quot;,
document.all(&quot;object3&quot;).style.visibility = &quot;hidden&quot;;
else
document.object1.visibility = &quot;show&quot;,
document.object2.visibility = &quot;show&quot;,
document.object3.visibility = &quot;hide&quot;;
}
//-->
</SCRIPT>

</head>

<body>

<div id=&quot;object1&quot; style=&quot;position:absolute; visibility:hidden; left:280px; top:40px; z-index:2;&quot;>
    <table width=130 border=0 cellspacing=5 cellpadding=0>
        <tr>
            <td>
                <p>
                    <font color=&quot;#FF9900&quot; size=&quot;4&quot;>
                        Menu
                    </font>
                </p>
            </td>
        </tr>
        <tr>
            <td>
                <a href=&quot;[URL unfurl="true"]http://www.123webmaster.com&quot;>[/URL]
                    <b>
                        <font color=&quot;#00FF00&quot; size=&quot;3&quot;>
                            Blah
                        </font>
                    </b>
                </a>
            </td>
        </tr>
    </table>
</div>

<div id=&quot;object2&quot; style=&quot;position:absolute; visibility:hidden; left:80px; top:40px; z-index:2;&quot;>
    <table width=130 border=0 cellspacing=5 cellpadding=0>
        <tr width=&quot;100&quot; height=&quot;73&quot;>
            <td>
                <img border=&quot;0&quot; src=&quot;Images/Game.jpg&quot;
            </td>
        </tr>
    </table>
</div>

<div id=object3 style=&quot;position:absolute; left:280px; top:240px ; z-index:2;&quot;>
    <p>
        <a href=&quot;&quot; onmouseover=&quot;show()&quot;>
            <font color=&quot;#FF9900&quot; size=&quot;7&quot;>
                PLAY
            </font>
        </a>
    </p>
</div>

</body>
</html>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top