natimage Posted June 19, 2004 Posted June 19, 2004 If anyone could look at this, it would be great. I'm not familiar with javascript at all. THIS PAGE loads fine, however, the navigation bar has one problem! The very bottom link "Weblinks" is not showing it's rollover state as it should. The entire nav bar was created in Fireworks, and imported into Dreamweaver. The image for that link wouldn't show up at all to begin with. Then I changed to img src link from relative to absolute, and it came up. However, the rollover still isn't showing up. I don't know what the problem is...but it's driving me nuts. With the relative url in place, I commented out the javascript and the image showed up. Remove comments from javascript, image won't show. With the absolute url...javascript is there and the image shows, but the javascript doesn't work. Thanks in advance!! Quote
dsdemmin Posted June 19, 2004 Posted June 19, 2004 It might be something very simple... looking quickly I would get rid of the 'MM_startTimeout();' Everything else looks ok (although I did not look super close); the images are correct (and there; sometimes that is the problem). If that does not work I will look closer.... Good Luck Tracy. Quote
dsdemmin Posted June 19, 2004 Posted June 19, 2004 Nope that is not it. You need to give a name to the image element: <img name="WebLinks" src="vnavbar/WebLinks.gif" width="137" height="47" border="0" alt=""> Quote
natimage Posted June 19, 2004 Author Posted June 19, 2004 (edited) In response to your first comment...you commented again too quickly for me!! I took that out...I had mistakenly added that...don't ask me why!! I also changed the img src back to a relative link (I hope I'm using these relative and absolute terms appropriately). The Weblinks.gif image is now showing up...but is still not rolling over. All the images are there and have been uploaded numerous times using both FileZilla, Dreamweaver, Binary and ASCII mode. I know none of those things should have made any kind of difference, but I tried anyway. So I'm still not sure what in the world is going on...it shows correctly in DW. I also tried re-exporting and got the same thing. Could it be something in the .js file? Edited June 19, 2004 by natimage Quote
natimage Posted June 19, 2004 Author Posted June 19, 2004 Nope that is not it. You need to give a name to the image element: <img name="WebLinks" src="vnavbar/WebLinks.gif" width="137" height="47" border="0" alt=""> I hate being a bubble burster... ...but I don't think that's it. The img name was there yesterday. I had taken it out to see if it was somehow causing the problem. I did put it back in just now, but it still won't rollover. I appreciate the reminder to put it back in, though!! Quote
dsdemmin Posted June 19, 2004 Posted June 19, 2004 This works for me (I did not change the JavaScript): [p.s. bubble was burst long ago... yep I'm bubbless ] ><html> <head> <title>Pioneers Hospital -- Healthcare on the Western Slope of Colorado</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <meta name="keywords" content="healthcare, careers, jobs, employment, colorado, co, western slope, meeker, hospital, healthcare jobs, openings, laboratory, radiology, respiratory, physical therapy, clinic, nursing nursing home, www.pioneershospital.org"> <meta name="description" content="Pioneers Hospital provides healthcare in Meeker, Colorado on the Western Slope. We offer excellent job opportunities in such fields as laboratory, respiratory therapy, surgery, nursing, radiology and much more."> <meta name="robots" content="ALL,FOLLOW"> <link href="PH.css" rel="stylesheet" type="text/css"> <script language="JavaScript"> <!-- function SymError() { return true; } window.onerror = SymError; 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> </head> <body onLoad="MM_preloadImages('vnavbar/LongTermCare_f3.gif','vnavbar/LongTermCare_f2.gif','vnavbar/WebLinks_f3.gif','vnavbar/WebLinks_f2.gif')"> <table width="137" border="0" align="right" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF"> <tr><td> <a href="../wing.php" target="_top" onMouseOut="MM_nbGroup('out'); "onMouseOver="MM_nbGroup('over','LongTermCare','vnavbar/LongTermCare_f2.gif','vnavbar/LongTermCare_f3.gif',1);" onClick="MM_nbGroup('down','navbar1','LongTermCare','vnavbar/LongTermCare_f3.gif',1);"> <img name="LongTermCare" src="vnavbar/LongTermCare.gif" width="137" height="47" border="0" alt=""></a></td> </tr> <tr><td> <a href="../links.php" target="_top" onMouseOut="MM_nbGroup('out'); "onMouseOver="MM_nbGroup('over','WebLinks','vnavbar/WebLinks_f2.gif','vnavbar/WebLinks_f3.gif',1);" onClick="MM_nbGroup('down','navbar1','WebLinks','vnavbar/WebLinks_f3.gif',1);"> <img name="WebLinks" src="vnavbar/WebLinks.gif" alt="" width="137" height="47" border="0"></a></td> </tr> </table> </body> </html> Quote
natimage Posted June 19, 2004 Author Posted June 19, 2004 It works for me too...however, I did add the img name to my original code and it still didn't work. You didn't change anything else?? Quote
natimage Posted June 19, 2004 Author Posted June 19, 2004 I have fixed it, but I have no idea what was wrong in the first place. I copied and pasted the table row from our post above, and it is working now. But I went through and compared your code with the original code and couldn't find any significant differences. Two things were different, but when I made them match your code, it still didn't work. I swear they were exactly the same! Anyway...the copy and paste works...I can live with that. I just hope I don't have the same problem when I go to update the navigation in a couple of weeks. Thanks, Scott, for your help!!!! Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.