Cadwalader
IS-IT--Management
Hello,
This is a wierd one: I am overhauling a site. The boss (who knows nothing about website design and programming--and doesn't want to know) has this script that some one wrote for one of his websites and he will not have a site up with out it. So I am stuck with putting this rainbow of a navbar at the top of everything I do. Anyway, it's onMouseOver events handling images in another table cell. It *was* powered by JS, but IE5.5 and IE6 seem to want to go back to the server everytime the script calls an image. Even though they are preloading (I proved this by putting everything on a floppy). So I found a work around using nothing but DOM's. Now it works fine. BUT! the boss wants the tabs that the mouse is not on to be gray, except for the one for the page you're on.
What I am having trouble with is how can I get an onMouseOver event to change things in 2 different cells?
Here is what I have so far...
(a functioning example of this code is at menshealth.ws/dhtml.html)
<table valign="center" width="700px" cellpadding="0" cellspacing="0" border="0">
<tr>
<td border="0" width="100" onMouseOver="id0.style.visibility='';" onMouseOut="id0.style.visibility='hidden';" id="lnk" align="center"><a href="index.html"><img src="images/hometab.gif"></a></td>
<td border="0" width="100" onMouseOver="id1.style.visibility='';" onMouseOut="id1.style.visibility='hidden';" id="lnk" align="center"><a href="about.html"><img src="images/aboutustab.gif"></a></td>
<td border="0" width="100" onMouseOver="id2.style.visibility='';" onMouseOut="id2.style.visibility='hidden';" id="lnk" align="center"><a href="alf.html"><img src="images/alftab.gif"></a></td>
<td border="0" width="100" onMouseOver="id3.style.visibility='';" onMouseOut="id3.style.visibility='hidden';" id="lnk" align="center"><a href="hormone.html"><img src="images/womentab.gif"></a></td>
<td border="0" width="100" onMouseOver="id4.style.visibility='';" onMouseOut="id4.style.visibility='hidden';" id="lnk" align="center"><a href="compound.html"><img src="images/mentab.gif"></a></td>
<td border="0" width="100" onMouseOver="id5.style.visibility='';" onMouseOut="id5.style.visibility='hidden';" id="lnk" align="center"><a href="faq.html"><img src="images/faq.gif"></a></td>
<td border="0" width="100" onMouseOver="id6.style.visibility='';" onMouseOut="id6.style.visibility='hidden';" id="lnk" align="center"><a href="contact.html"><img src="images/contactustab.gif"></a></td></TR>
<TR style="z-index:2;position:relative;">
<td height="21px" valign="top"colspan="7"><img style="position:absolute;left:0px" src="images/bar.gif"><div border="0" id="id0" onMouseOver="this.style.visibility='visible';" onMouseOut="this.style.visibility='hidden';" style="visibility:hidden;" align="center"><img style="position:absolute;left:0px" align="left" src="images/bar.gif"></div>
<div border="0" id="id1" onMouseOver="this.style.visibility='visible';" onMouseOut="this.style.visibility='hidden';" style="visibility:hidden;" align="center"><img style="position:absolute;left:0px" align="left" src="images/aboutusbar.gif"></div>
<div border="0" id="id2" onMouseOver="this.style.visibility='visible';" onMouseOut="this.style.visibility='hidden';" style="visibility:hidden;" align="center"><img style="position:absolute;left:0px" align="left" src="images/alfbar.gif"></div>
<div border="0" id="id3" onMouseOver="this.style.visibility='visible';" onMouseOut="this.style.visibility='hidden';" style="visibility:hidden;" align="center"><img style="position:absolute;left:0px" align="left" src="images/womenbar.gif"></div>
<div border="0" id="id4" onMouseOver="this.style.visibility='visible';" onMouseOut="this.style.visibility='hidden';" style="visibility:hidden;" align="center"><img style="position:absolute;left:0px" align="left" src="images/mensbar.gif"></div>
<div border="0" id="id5" onMouseOver="this.style.visibility='visible';" onMouseOut="this.style.visibility='hidden';" style="visibility:hidden;" align="center"><img style="position:absolute;left:0px" align="left" src="images/faqbar.gif"></div>
<div border="0" id="id6" onMouseOver="this.style.visibility='visible';" onMouseOut="this.style.visibility='hidden';" style="visibility:hidden;" align="center"><img style="position:absolute;left:0px" align="left" src="images/contactbar.gif"></div>
</TR>
</table>
Unfortunately, this has to be done without using JS. DOM's controlling visibility seem to work great. I know, some people never notice that IE is running back to the server, but it's making that navbar run slow and look like junk. What matters is the boss is seeing it, and he's not happy with it.
I hope someone can help...I really appreciate any suggestions, hints, criticisms, and solutions. Thanks in advance... Hope I was of some help...
--OR--
Thanks for the help...
--Rich
This is a wierd one: I am overhauling a site. The boss (who knows nothing about website design and programming--and doesn't want to know) has this script that some one wrote for one of his websites and he will not have a site up with out it. So I am stuck with putting this rainbow of a navbar at the top of everything I do. Anyway, it's onMouseOver events handling images in another table cell. It *was* powered by JS, but IE5.5 and IE6 seem to want to go back to the server everytime the script calls an image. Even though they are preloading (I proved this by putting everything on a floppy). So I found a work around using nothing but DOM's. Now it works fine. BUT! the boss wants the tabs that the mouse is not on to be gray, except for the one for the page you're on.
What I am having trouble with is how can I get an onMouseOver event to change things in 2 different cells?
Here is what I have so far...
(a functioning example of this code is at menshealth.ws/dhtml.html)
<table valign="center" width="700px" cellpadding="0" cellspacing="0" border="0">
<tr>
<td border="0" width="100" onMouseOver="id0.style.visibility='';" onMouseOut="id0.style.visibility='hidden';" id="lnk" align="center"><a href="index.html"><img src="images/hometab.gif"></a></td>
<td border="0" width="100" onMouseOver="id1.style.visibility='';" onMouseOut="id1.style.visibility='hidden';" id="lnk" align="center"><a href="about.html"><img src="images/aboutustab.gif"></a></td>
<td border="0" width="100" onMouseOver="id2.style.visibility='';" onMouseOut="id2.style.visibility='hidden';" id="lnk" align="center"><a href="alf.html"><img src="images/alftab.gif"></a></td>
<td border="0" width="100" onMouseOver="id3.style.visibility='';" onMouseOut="id3.style.visibility='hidden';" id="lnk" align="center"><a href="hormone.html"><img src="images/womentab.gif"></a></td>
<td border="0" width="100" onMouseOver="id4.style.visibility='';" onMouseOut="id4.style.visibility='hidden';" id="lnk" align="center"><a href="compound.html"><img src="images/mentab.gif"></a></td>
<td border="0" width="100" onMouseOver="id5.style.visibility='';" onMouseOut="id5.style.visibility='hidden';" id="lnk" align="center"><a href="faq.html"><img src="images/faq.gif"></a></td>
<td border="0" width="100" onMouseOver="id6.style.visibility='';" onMouseOut="id6.style.visibility='hidden';" id="lnk" align="center"><a href="contact.html"><img src="images/contactustab.gif"></a></td></TR>
<TR style="z-index:2;position:relative;">
<td height="21px" valign="top"colspan="7"><img style="position:absolute;left:0px" src="images/bar.gif"><div border="0" id="id0" onMouseOver="this.style.visibility='visible';" onMouseOut="this.style.visibility='hidden';" style="visibility:hidden;" align="center"><img style="position:absolute;left:0px" align="left" src="images/bar.gif"></div>
<div border="0" id="id1" onMouseOver="this.style.visibility='visible';" onMouseOut="this.style.visibility='hidden';" style="visibility:hidden;" align="center"><img style="position:absolute;left:0px" align="left" src="images/aboutusbar.gif"></div>
<div border="0" id="id2" onMouseOver="this.style.visibility='visible';" onMouseOut="this.style.visibility='hidden';" style="visibility:hidden;" align="center"><img style="position:absolute;left:0px" align="left" src="images/alfbar.gif"></div>
<div border="0" id="id3" onMouseOver="this.style.visibility='visible';" onMouseOut="this.style.visibility='hidden';" style="visibility:hidden;" align="center"><img style="position:absolute;left:0px" align="left" src="images/womenbar.gif"></div>
<div border="0" id="id4" onMouseOver="this.style.visibility='visible';" onMouseOut="this.style.visibility='hidden';" style="visibility:hidden;" align="center"><img style="position:absolute;left:0px" align="left" src="images/mensbar.gif"></div>
<div border="0" id="id5" onMouseOver="this.style.visibility='visible';" onMouseOut="this.style.visibility='hidden';" style="visibility:hidden;" align="center"><img style="position:absolute;left:0px" align="left" src="images/faqbar.gif"></div>
<div border="0" id="id6" onMouseOver="this.style.visibility='visible';" onMouseOut="this.style.visibility='hidden';" style="visibility:hidden;" align="center"><img style="position:absolute;left:0px" align="left" src="images/contactbar.gif"></div>
</TR>
</table>
Unfortunately, this has to be done without using JS. DOM's controlling visibility seem to work great. I know, some people never notice that IE is running back to the server, but it's making that navbar run slow and look like junk. What matters is the boss is seeing it, and he's not happy with it.
I hope someone can help...I really appreciate any suggestions, hints, criticisms, and solutions. Thanks in advance... Hope I was of some help...
--OR--
Thanks for the help...
--Rich