+ Reply to Thread
Page 1 of 2 12 LastLast
Results 1 to 10 of 17
Like Tree1Likes

Thread: Dreamweaver rollover help!

  1. #1
    baz_m_191 is offline x10Hosting Member baz_m_191 is an unknown quantity at this point
    Join Date
    May 2011
    Posts
    16

    Dreamweaver rollover help!

    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
    y1n997 likes this.

  2. #2
    Darkmere's Avatar
    Darkmere is offline x10 Lieutenant Darkmere is an unknown quantity at this point
    Join Date
    Jun 2011
    Location
    Fernley, Nevada
    Posts
    360

    Re: Dreamweaver rollover help!

    They are working for me, they all animate when I roll over them

    Computer Forensics/Security Student
    Kaplan University
    Site: http://skynet.x10.mx

  3. #3
    baz_m_191 is offline x10Hosting Member baz_m_191 is an unknown quantity at this point
    Join Date
    May 2011
    Posts
    16

    Re: Dreamweaver rollover help!

    Cheers bud, not showing in safari... Strange!!

    Which browser are you using? Cheers for looking!

  4. #4
    Darkmere's Avatar
    Darkmere is offline x10 Lieutenant Darkmere is an unknown quantity at this point
    Join Date
    Jun 2011
    Location
    Fernley, Nevada
    Posts
    360

    Re: Dreamweaver rollover help!

    Firefox 5.0+

    Computer Forensics/Security Student
    Kaplan University
    Site: http://skynet.x10.mx

  5. #5
    baz_m_191 is offline x10Hosting Member baz_m_191 is an unknown quantity at this point
    Join Date
    May 2011
    Posts
    16

    Re: Dreamweaver rollover help!

    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!

  6. #6
    LostHorizon's Avatar
    LostHorizon is offline x10Hosting Member LostHorizon is an unknown quantity at this point
    Join Date
    Dec 2010
    Posts
    35

    Re: Dreamweaver rollover help!

    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>&nbsp;</p>) in your JavaScript function "MM_findObj()" at the <HEAD> section of your HTML document:

    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>&nbsp;</p>
    34     }
    This is where the error occurs, and it will fix the error.

    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:

    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>&nbsp;  </p>
    82     </div>
    83     </div>
    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).
    Website: http://losthorizon.cz.cc/

    "Genius is one percent inspiration and ninety-nine percent perspiration" -- Thomas Alva Edison.

  7. #7
    baz_m_191 is offline x10Hosting Member baz_m_191 is an unknown quantity at this point
    Join Date
    May 2011
    Posts
    16

    Re: Dreamweaver rollover help!

    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

  8. #8
    callumacrae's Avatar
    callumacrae is offline not alex mac callumacrae is just really nice
    Join Date
    Dec 2007
    Location
    Wellesbourne, England
    Posts
    5,162

    Re: Dreamweaver rollover help!

    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."

  9. #9
    LostHorizon's Avatar
    LostHorizon is offline x10Hosting Member LostHorizon is an unknown quantity at this point
    Join Date
    Dec 2010
    Posts
    35

    Re: Dreamweaver rollover help!

    Hi "baz_m_191",

    Quote Originally Posted by baz_m_191 View Post
    Sorry to be a pain but why do you think that line would have been in there?
    If what you're referring to is line #33 in:

    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>&nbsp;</p>
    34     }
    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).


    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>&nbsp;</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.

  10. #10
    baz_m_191 is offline x10Hosting Member baz_m_191 is an unknown quantity at this point
    Join Date
    May 2011
    Posts
    16

    Re: Dreamweaver rollover help!

    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

+ Reply to Thread
Page 1 of 2 12 LastLast

Similar Threads

  1. Rollover Buttons with pictures
    By naves in forum Graphics & Webdesign
    Replies: 4
    Last Post: 11-30-2008, 11:58 AM
  2. Rollover help needed
    By surreal5335 in forum Programming Help
    Replies: 9
    Last Post: 06-17-2008, 05:29 PM
  3. Image rollover
    By DemptD in forum Scripts & 3rd Party Apps
    Replies: 1
    Last Post: 06-03-2008, 04:10 PM
  4. good rollover button tutorial
    By Chris Z in forum Scripts & 3rd Party Apps
    Replies: 2
    Last Post: 08-08-2006, 01:38 PM
  5. Image Rollover HTML
    By arkitek in forum Scripts & 3rd Party Apps
    Replies: 9
    Last Post: 04-26-2005, 08:31 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers