Hi,
hope someone can help me figure this out... my rollover buttons on the bottom of the pages wont work!
Any ideas will be greatly appreciated, sorry if its obvious but cant get my head round it!!
Thanks in advance:
www.becreative.x10.bz
Hi,
hope someone can help me figure this out... my rollover buttons on the bottom of the pages wont work!
Any ideas will be greatly appreciated, sorry if its obvious but cant get my head round it!!
Thanks in advance:
www.becreative.x10.bz
They are working for me, they all animate when I roll over them
Cheers bud, not showing in safari... Strange!!
Which browser are you using? Cheers for looking!![]()
Firefox 5.0+
Cheers
Have looked at work and your right they work in Firefox.... but not in Safari, or Ie.
Anyone came across a similar thing or see a possible solution.
As ever thanks in advance!
Hi "baz_m_191",
First of all, I'm curious to know if you're writing the codes yourself, or if you're using Adobe Dreamweaver to design the web page(s) and have it generated the codes for you (I'll let you know in a second the reason why I'm asking this).
Anyway, I think that I've found the problem with your page's rollover buttons. The reason that they're working in Mozilla Firefox is that probably the browser is IGNORING the error, but Microsoft Internet Explorer (and probably Apple Safari too) is NOT.
To fix the problem, you'll need to take out/delete line #33 (<p> </p>) in your JavaScript function "MM_findObj()" at the <HEAD> section of your HTML document:
This is where the error occurs, and it will fix the error.Code:27 function MM_findObj(n, d) { //v4.01 28 var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) { 29 d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);} 30 if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n]; 31 for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); 32 if(!x && d.getElementById) x=d.getElementById(n); return x; 33 <p> </p> 34 }
Hope this helps. Let me know if the fix is working for you (or NOT).
********
To answer the question WHY I'm asking if you're writing the codes yourself, or if you're using Dreamweaver to generate the codes for you is that on line #80 in the <BODY> section of your HTML document:
all the "onMouseOver" and "onMouseOut" intrinsic events should have been handled/placed in the <IMG> tags, not the <A> tags, even though the codes work since they're looking for the correct image object ID names (it's more CORRECT this way since you move your mouse over and out of the images, not the links).Code:77 <div class="wrapper"> 78 <div "style=width:960px; margin:auto="margin:auto""> 79 <p align="center"> 80 <a href="gallery.html" onMouseOver="MM_swapImage('gall','','botgal.png',1)" onMouseOut="MM_swapImgRestore()" ><img src="botgal grey.png" name="gall" width="171" height="161" hspace="20" border="0" id="gall"></a><a href="services.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('serv','','botser.png',1)"><img src="botser grey.png" name="serv" width="171" height="161" hspace="20" border="0" id="serv"></a><a href="about us.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('about','','botabout.png',1)"><img src="botabout grey.png" name="about" width="171" height="161" hspace="20" border="0" id="about"></a><a href="contact.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('cont','','botcont.png',1)"><img src="botcont grey.png" name="cont" width="171" height="161" hspace="20" border="0" id="cont"></a></p> 81 <p> </p> 82 </div> 83 </div>
►Website: http://losthorizon.cz.cc/
"Genius is one percent inspiration and ninety-nine percent perspiration" -- Thomas Alva Edison.
WOW!!!!
Losthorizon you are a hero! Really really appreciate the time and effort spent on that reply... Thank you very much!
I will try amending that and let you know how I get on, but even if this doesnt fix the problem I am pleased you have taken time to check the coding!
Sorry to be a pain but why do you think that line would have been in there? I am very new to this and am picking up as much as I can along the way ( have managed to get my head round the majority of things but it is hard work when coming from a primarily design background.
With regard the rollover images, I created these (and the rest of the site... Bar the unavoidable checking/changing code, adding wrappers etc) in design view, I simply inserted image/rollover image. The code was fine for a while then as more elements were added the rollover failed ( the additional pages were the coding from page A copied and pasted... Then any images/text or variables changed to suit the relevant page... A bit of a cheat I suppose and also the reason that the other pages fail!).
On a side note I googled this to no avail and also tried creating rollover in fireworks but something ( hopefully this error you have spotted) stopped that from working too!!
Phew - that was a bit long winded!!
Anyway thanks again and I will let you know as soon as I have tested the amend
Cheers
Baz![]()
This is exactly why you shouldn't use applications like Dreamweaver. They produce invalid and bloated pages that don't function the same in all browsers.
I can customise your phpBB board. Send me a PM.
lynxphp - info, tutorials and scripts
"A forum post should be like a skirt; long enough to cover the subject but short enough to keep things interesting."
Hi "baz_m_191",
If what you're referring to is line #33 in:
That line of codes SHOULDN'T even be in there simply because it's HTML codes while the rest of the codes are JavaScript (I guess it's the result of all your copying & pasting).Code:27 function MM_findObj(n, d) { //v4.01 28 var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) { 29 d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);} 30 if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n]; 31 for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); 32 if(!x && d.getElementById) x=d.getElementById(n); return x; 33 <p> </p> 34 }
HOW DO I COME TO THIS CONCLUSION/FINDING?
If you're using Microsoft Internet Explorer, double-click on the yellow error warning icon on the left of your browser window's status bar (the icon appears whenever you have error(s) in your page), and the browser will show you the line number(s) where the error has occurred (in this case, line #80 after you move your mouse over the rollover image) - or you can view the error(s) in the Developer Tools window (press F12 to bring up), and the rest is just a matter of tracing through the codes:
<line #80>: onMouseOver="MM_swapImage('gall','','botgal.png',1 )"
<line #36>: function MM_swapImage() --> MM_findObj(a[i]) <line #38>
<line #27>: function MM_findObj(n, d) --> <p> </p> <line #33>
P.S.: I'm VERY SURE (almost %100 SURE) that removing line #33 will fix your problem to get the rollover images working in Internet Explorer since I've got a subset of your codes (not all of the codes) working on my computer's local drive (I tested the codes first before I replied to your post). But let me know how it turns out anyway regardless.
►Website: http://losthorizon.cz.cc/
"Genius is one percent inspiration and ninety-nine percent perspiration" -- Thomas Alva Edison.
Callum what would you suggest as an alternative?
Like I said above I am from a design background and was under the impression that dreamweaver was the main industry standard (the other cs suite programmes are).
Cheers
Baz