PDA

View Full Version : help: tabmouseover script, can't find problem, going blind from staring



jbinbi
12-02-2005, 03:57 PM
I have modified the tabmouseover script, and am using it successfully in my site.

http://www.dynamicdrive.com/dynamicindex1/tabmouseover.htm

See the second menu bar on (starts with "mono analog")

http://www.1stvision.com/cameras/JAI/jaicorporate.htm

However, on the following page, set up the same way, no matter what I do, I cannot get the tabmouseover menu bar to go to more than half the width of the page, and the more items I put in the bar, the more its wrapping. (starts with "Dolphins")

http://www.1stvision.com/cameras/AVT/avtcorporate.htm

The following files are the menubars in each page. I have played around with my widths, I have put the menubar file that works across the whole page into the page that only goes half way, and it works, so I believe something is wrong in the script that I am including in the page, not in the page itself.

Any help would be greatly appreicated, since I have stared at this for 2 days now and can't figure it out!

This file is for the menubar that is working across the whole page.
++++++++++++++++++++++++++++++++++++++++++++
<html>

<head>
<style>
a {text-decoration:none; font-family:verdana; font-size:12;font-weight:bold;}

div.jaimenu {width:740 px; height:22;background-color:blue;font-size:11 pt;text-decoration:none;}
a.whitelink:link {color:white;text-decoration:none;}
a.whitelink:visited {color:white;text-decoration:none;}
a.whitelink:active {color:white;text-decoration:none;}
a.whitelink:hover {color:red;text-decoration:none;}

a.redlink:link {color:red;text-decoration:none;}
a.redlink:visited {color:red;text-decoration:none;}
a.redlink:active {color:red;text-decoration:none;}
a.redlink:hover {color:red;text-decoration:none;}


</style>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>this headline is blue and 16 pt</title>
</head>

<body>


<div class ="jaimenu">
<a class="whitelink" href="http://www.1stvision.com/cameras/JAI/jaierror.htm" onMouseover="showit(0)"> Mono Analog | <a class="whitelink" href="http://www.1stvision.com/cameras/JAI/jaierror.htm" onMouseover="showit(1)">Color Analog | <a class="whitelink" href="http://www.1stvision.com/cameras/JAI/jaierror.htm" onMouseover="showit(2)">Microheads
| <a class="whitelink" href="http://www.1stvision.com/cameras/JAI/jaierror.htm" onMouseover="showit(3)">Camera Link Mono </a> <a class="whitelink" href="http://www.1stvision.com/cameras/JAI/jaierror.htm" onMouseover="showit(4)"> | Camera Link Color </a> <a class="whitelink" href="http://www.1stvision.com/cameras/JAI/jaierror.htm" onMouseover="showit(5)"> | GigE</a><br>
</div>
<!-- Edit the dimensions of the below, plus background color-->
<ilayer width=500 height=12 name="dep1" bgColor="#CCFFFF" link ="#FFFFFF" Font color="#000000">
<layer name="dep2" width=500 height=12>
</layer>
</ilayer>
<div id="describe" style="background-color:#000000 font color:#000000;width:800px;height:12px" onMouseover="clear_delayhide()" onMouseout="resetit(event)"></div>


<script language="JavaScript1.2">

/*
Tabs Menu (mouseover)- By Dynamic Drive
For full source code and more DHTML scripts, visit http://www.dynamicdrive.com
This credit MUST stay intact for use
*/

var submenu=new Array()

//Set submenu contents. Expand as needed. For each content, make sure everything exists on ONE LINE. Otherwise, there will be JS errors.

submenu[0]='<font size="2" face="Verdana";font color="FF0000"><a class="redlink" href="http://www.1stvision.com/cameras/JAI/cva50.htm">A50</a> | <a class="redlink" href="http://www.1stvision.com/cameras/JAI/cva60.htm">A60</a> | <a class="redlink" href="http://www.1stvision.com/cameras/JAI/cvm50.htm">M60</a>| <a class="redlink" href="http://www.1stvision.com/cameras/JAI/cvm50ir.htm">M50IR</a>| <a class="redlink" href="http://www.1stvision.com/cameras/JAI/cvm300.htm">M300</a>| <a class="redlink" href="http://www.1stvision.com/cameras/JAI/cva11.htm">A11</a>| <a class="redlink" href="http://www.1stvision.com/cameras/JAI/cva10cl.htm">A10CL</a>| <a class="redlink" href="http://www.1stvision.com/cameras/JAI/cvm10sx.htm">M10</a>| <a class="redlink" href="http://www.1stvision.com/cameras/JAI/cvm40.htm">M40</a>| <a class="redlink" href="http://www.1stvision.com/cameras/JAI/cva1.htm">A1</a>| <a class="redlink" href="http://www.1stvision.com/cameras/JAI/cva2.htm">A2</a></b></font> '

submenu[1]='<font size="2" face="Verdana";font color="FF0000"><a class="redlink" href="http://www.1stvision.com/cameras/JAI/cvm91.htm">M91 B/C</a> | <a class="redlink" href="http://www.1stvision.com/cameras/JAI/cvm77.htm">M77</a> | <a class="redlink" href="http://www.1stvision.com/cameras/JAI/cvs3200.htm">3200</a> | <a class="redlink" href="http://www.1stvision.com/cameras/JAI/cvs3300.htm">3300</a></b></font>'

submenu[2]='<font size="2" face="Verdana";font color="FF0000"><a class="redlink" href="http://www.1stvision.com/cameras/JAI/cvm436.htm">436</a> | <a class="redlink" href="http://www.1stvision.com/cameras/JAI/cvm2200.htm">2200</a> | <a class="redlink" href="http://www.1stvision.com/cameras/JAI/cvm2350.htm">2350</a></b></font>'



//Set delay before submenu disappears after mouse moves out of it (in milliseconds)
var delay_hide=500

/////No need to edit beyond here


++++++++++++++++++++++++++++++++++

This file is for the menubar that won't go more than half the page!

<html>

<head>
<style>
div.avtmenu {width:690 px; height:22;background-color:blue;font-size:11 pt;}
a {text-decoration:none; font-family:verdana;}

a.whitelink:link {color:white;}
a.whitelink:visited {color:white;}
a.whitelink:active {color:white;}
a.whitelink:hover {color:red;}

a.redlink:link {color:red;}
a.redlink:visited {color:red;}
a.redlink:active {color:red;}
a.redlink:hover {color:red;}


</style>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>this headline is blue and 16 pt</title>
</head>

<body>


<div class ="avtmenu">
<a class="whitelink" href="http://www.1stvision.com/cameras/AVT/dolphins.htm" onMouseover="showit(0)"> Dolphins | <a class="whitelink" href="http://www.1stvision.com/cameras/AVT/guppies.htm" onMouseover="showit(4)">Guppies |<a class="whitelink" href="http://www.1stvision.com/cameras/AVT/marlins.htm" onMouseover="showit(1)">Marlins | <a class="whitelink" href="http://www.1stvision.com/cameras/AVT/oscars.htm" onMouseover="showit(2)">Oscars | <a class="whitelink" href="www.1stvision.com" onmouseover="showit(3)">Software</a><br>
</div>
<!-- Edit the dimensions of the below, plus background color-->
<ilayer width=691 height=12 name="dep1" bgColor="#CCFFFF" link ="#FFFFFF" Font color="#000000">
<layer name="dep2" width=690 height=12>
</layer>
</ilayer>
<div id="describe" style="background-color:#000000 font color:#000000;width:690px;height:12px" onMouseover="clear_delayhide()" onMouseout="resetit(event)"></div>


<script language="JavaScript1.2">

/*
Tabs Menu (mouseover)- By Dynamic Drive
For full source code and more DHTML scripts, visit http://www.dynamicdrive.com
This credit MUST stay intact for use
*/

var submenu=new Array()

//Set submenu contents. Expand as needed. For each content, make sure everything exists on ONE LINE. Otherwise, there will be JS errors.

submenu[0]='<font size="2" face="Verdana";font color="FF0000"><a class="redlink" href="http://www.1stvision.com/cameras/AVT/avtd145.htm">F145B/C</a> | <a class="redlink" href="http://www.1stvision.com/cameras/AVT/avtd201.htm">F210 B/C</a> </a></font>'

submenu[1]='<font size="2" face="Verdana";font color="FF0000"><a class="redlink" href="http://www.1stvision.com/cameras/AVT/avtf033.htm">F033 B/C</a> | <a class="redlink" href="http://www.1stvision.com/cameras/AVT/avtf046.htm">F046 B/C</a> | <a class="redlink" href="http://www.1stvision.com/cameras/AVT/avtf080.htm">F080 B/C</a> | <a class="redlink" href="http://www.1stvision.com/cameras/AVT/avtf131.htm">F131 B/C</a> | <a class="redlink"href="http://www.1stvision.com/cameras/AVT/avtf145.htm">F145 B2/C2</a> | <a class="redlink"href="http://www.1stvision.com/cameras/AVT/avtf146.htm">F146 B/C</a>'

submenu[2]='<font size="2" face="Verdana";font color="FF0000"><a class="redlink" href="http://www.1stvision.com/cameras/AVT/avto320.htm">320</a> | <a class="redlink" href="http://www.1stvision.com/cameras/AVT/avto510.htm">510</a> | <a class="redlink" href="http://www.1stvision.com/cameras/AVT/avt0810.htm">810</a></b></font>'

submenu[3]='<font size="2" face="Verdana";font color="FF0000"><a class="redlink" href="http://www.1stvision.com/cameras/AVT/avtfirepackage.htm">Firepackage</a> | <a class="redlink" href="http://www.1stvision.com/cameras/AVT/avtdirectfirepackage.htm">Direc X Firepackage</a> | <a class="redlink" href="http://www.1stvision.com/cameras/AVT/avtfire4linux.htm">Linux</a> | <a class="redlink" href="http://www.1stvision.com/software/absoft.htm">AB Soft Active X</a> | <a class="redlink"href="http://www.outcastsoft.com/">Apple</a>'

submenu[4]='<font size="2" face="Verdana";font color="FF0000"><a class="redlink" href="http://www.1stvision.com/cameras/AVT/avtg025.htm">G025 B/C</a> | <a class="redlink" href="http://www.1stvision.com/cameras/AVT/avtg029.htm">G029 B/C</a> | <a class="redlink" href="http://www.1stvision.com/cameras/AVT/avtg033.htm">G033 B/C</a> | <a class="redlink" href="http://www.1stvision.com/cameras/AVT/avtg036.htm">G036 B/C</a> | <a class="redlink"href="http://www.1stvision.com/cameras/AVT/avtg046.htm">G046B/C</a> | <a class="redlink"href="http://www.1stvision.com/cameras/AVT/avtg080.htm">G080 B/C</a>'


//Set delay before submenu disappears after mouse moves out of it (in milliseconds)
var delay_hide=500

/////No need to edit beyond here

jscheuer1
12-02-2005, 05:17 PM
On your stylesheet http://www.1stvision.com/styles2.css :



div.avtmenu {width:340 px; height:22;background-color:blue;font-size:11 pt;}

I'd try:


div.avtmenu {height:22px;background-color:blue;font-size:11 pt;}

jbinbi
12-02-2005, 09:47 PM
John, you da man! I cut my css into the page to help me debug, and forgot about the fact that I now have .avtmenu defined 2x! I was pulling my hair out trying to figure out why when I was changing the width, it wasn't changing...