|
I am new to java, but am learning fast. I inherited a site with css and java already in it. My index page has popup menus that pop out to the right, they used to work (I have an older save of index to test), but they
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_nbGroup(event, grpName) { //v6.0
var i,img,nbArr,args=MM_nbGroup.arguments;
if (event == "init" && args.length > 2) {
if ((img = MM_findObj(args[2])) != null && !img.MM_init) {
img.MM_init = true; img.MM_up = args[3]; img.MM_dn = img.src;
if ((nbArr = document[grpName]) == null) nbArr = document[grpName] = new Array();
nbArr[nbArr.length] = img;
for (i=4; i < args.length-1; i+=2) if ((img = MM_findObj(args[i])) != null) {
if (!img.MM_up) img.MM_up = img.src;
img.src = img.MM_dn = args[i+1];
nbArr[nbArr.length] = img;
} }
} else if (event == "over") {
document.MM_nbOver = nbArr = new Array();
for (i=1; i < args.length-1; i+=3) if ((img = MM_findObj(args[i])) != null) {
if (!img.MM_up) img.MM_up = img.src;
img.src = (img.MM_dn && args[i+2]) ? args[i+2] : ((args[i+1])? args[i+1] : img.MM_up);
nbArr[nbArr.length] = img;
}
} else if (event == "out" ) {
for (i=0; i < document.MM_nbOver.length; i++) {
img = document.MM_nbOver[i]; img.src = (img.MM_dn) ? img.MM_dn : img.MM_up; }
} else if (event == "down") {
nbArr = document[grpName];
if (nbArr)
for (i=0; i < nbArr.length; i++) { img=nbArr[i]; img.src = img.MM_up; img.MM_dn = 0; }
document[grpName] = nbArr = new Array();
for (i=2; i < args.length-1; i+=2) if ((img = MM_findObj(args[i])) != null) {
if (!img.MM_up) img.MM_up = img.src;
img.src = img.MM_dn = (args[i+1])? args[i+1] : img.MM_up;
nbArr[nbArr.length] = img;
} }
}
//-->
</script>
<body onload="MM_preloadImages('images/splash_nav_r1_c4_f3.jpg', 'images/splash_nav_r1_c4_f2.jpg', 'images/splash_nav_r1_c4_f4.jpg', 'images/splash_nav_r3_c1_f3.jpg', 'images/splash_nav_r3_c1_f2.jpg', 'images/splash_nav_r3_c1_f4.jpg', 'images/splash_nav_r3_c3_f3.jpg', 'images/splash_nav_r3_c3_f2.jpg', 'images/splash_nav_r3_c3_f4.jpg', 'images/splash_nav_r3_c5_f3.jpg', 'images/splash_nav_r3_c5_f2.jpg', 'images/splash_nav_r3_c5_f4.jpg', 'images/splash_nav_r3_c8_f3.jpg', 'images/splash_nav_r3_c7_f2.jpg', 'images/splash_nav_r3_c7_f4.jpg', 'images/splash_nav_r3_c9_f3.jpg', 'images/splash_nav_r3_c9_f2.jpg', 'images/splash_nav_r3_c9_f4.jpg', 'images/splash_nav_r5_c1_f3.jpg', 'images/splash_nav_r5_c1_f2.jpg', 'images/splash_nav_r5_c1_f4.jpg', 'images/splash_nav_r5_c3_f3.jpg', 'images/splash_nav_r5_c3_f2.jpg', 'images/splash_nav_r5_c3_f4.jpg', 'images/splash_nav_r5_c5_f3.jpg', 'images/splash_nav_r5_c5_f2.jpg', 'images/splash_nav_r5_c5_f4.jpg', 'images/splash_nav_r7_c5_f3.jpg', 'images/splash_nav_r7_c5_f2.jpg', 'images/splash_nav_r7_c5_f4.jpg', 'images/splash_nav_r5_c7_f3.jpg', 'images/splash_nav_r5_c7_f2.jpg', 'images/splash_nav_r5_c7_f4.jpg')">
The page I am working on ishttp://www.nmprc.state.nm.us. The popout menus sort of work in IE7, but when the mouse goes over one of the images behind the menu, the menu disappears.
I have no absolute values in my css.
the menu list items use this code from the css
ul {
margin: 0;
padding: 0;
list-style: none;
width: 160px; /* Width of Menu Items */
border-bottom: 1px solid #CBA;
}
ul li {
position: relative;
}
li ul {
position: absolute;
left: 159px; /* Set 1px less than menu width */
top: 0;
display: none;
}
/* Styles for Menu Items */
ul li a {
display: block;
text-decoration: none;
padding: 4px;
border: 1px solid #CBA;
border-bottom: 0;
background-color: #F9F9F9;
}
/* Fix IE. Hide from IE Mac \*/
* html ul li { float: left; height: 1%; }
* html ul li a {
height: 1%;
}
/* End */
ul li a:hover {
color: #f9f9f9;
background-color: #660000;
} /* Hover Styles */
li ul li a { padding: 2px; } /* Sub Menu Styles */
li:hover ul, li.over ul { display: block; } /* The magic */
any ideas?
don't now. Well they work in Firefox, and sort of in IE7, but not in IE6 at all. I have narrowed it down to the script below which preloads the images that make up the index page. If I take out the preloading of the images, the menus work, but with this in they don't.
Last edited by mgraphic; 01-23-2007 at 12:50 AM..
Reason: Post breaking
|