Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New Coder
    Join Date
    Mar 2007
    Posts
    39
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Code working in FF2 but nothing else!

    I have some code that works fine in FF2, but for some reason it doesn't work in FF3, IE6 and Safari.

    To see see the problem click on the link below then click on any marker on the map. Then click on a preview image to see a larger version. This much appears to work in all browsers, but when you close the image and open another one something goes wrong.

    The image is located within a div with another div inside it. This nested div starts off with a height of 10000px to allow the image to load of screen and then be resized before the nested div is then shrunk to show the image. Line 524:

    Code:
    document.getElementById('imageSpacer').style.height=(((myHeight-120) - (img_height)) / 2 + 'px');
    Then after this the close button fails to work altogether. In addition to this the forwards and backwards buttons (currently not styled) do not work in anything other then FF2.

    I have tried trawling through my code trying to find out where it is going wrong but to no avail. I hope I have explained this clearly enough and I would be very grateful if anyone can help!

    http://holidaymaps.googlepages.com/IMAGEtest.html

  • #2
    Senior Coder NancyJ's Avatar
    Join Date
    Feb 2005
    Location
    Bradford, UK
    Posts
    3,174
    Thanks
    19
    Thanked 66 Times in 65 Posts
    My console reports that document.getElementById('pictureRight') is null - on this line: document.getElementById('pictureRight').style.display="none"; and an unterminated string literal with your javascript:loadImage()

    I don't know if that helps.

  • #3
    Kor
    Kor is offline
    Red Devil Mod Kor's Avatar
    Join Date
    Apr 2003
    Location
    Bucharest, ROMANIA
    Posts
    8,478
    Thanks
    58
    Thanked 379 Times in 375 Posts
    Your page does not pass the W3C validation either:
    http://validator.w3.org/check?uri=ht...Inline&group=0
    KOR
    Offshore programming
    -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

  • #4
    New Coder
    Join Date
    Mar 2007
    Posts
    39
    Thanks
    1
    Thanked 0 Times in 0 Posts
    I have now validated my XHTML and passes fine now.

    I removed the offending Javascript that you mentioned above but that does not appear to be what is causing the problem. What were you using to discover that error anyway? I have tried using the error console in FF and Firebug but can't see a feature that would give me that kind of error.

  • #5
    New Coder
    Join Date
    Mar 2007
    Posts
    39
    Thanks
    1
    Thanked 0 Times in 0 Posts
    After I threatened my code it finally responded. Well, not quite. The problem Appears to be the drawing and re-drawing of overlaying DIVs, it just didn't like it. So each time the DIVs now have a number in their name which increments each time they are drawn again resulting in two DIVs never having the same name. Not quite strictly how it should probably work, but it does the trick none the less.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •