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 4 of 4
  1. #1
    New Coder
    Join Date
    Aug 2011
    Posts
    16
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Script problems in IE8, Safari and Chrome

    Hello all,

    I'm back with more silly newbie questions.

    I'm building a website that includes 3 javascript codes:
    1. Onmouseover image switch for the nav bar.
    2. On a specific page, onmouseover display of hidden divs.
    3. Particletree's Dynamic Resolution Dependent Layout script
    (http://particletree.com/features/dyn...ndent-layouts/)

    All three scripts work fine in firefox, but the 2nd script doesn't work in safari and chrome, and the 3rd one doesn't work in safari, chrome and IE(8). Since the 1st one works fine in all browsers, I'm guessing this isn't a problem with my javascript link or anything like that.

    The website is:
    www.sheket.co.il/index4.html

    The specific page that runs the 2nd code is:
    www.sheket.co.il/services.html

    My javascript is:
    http://www.sheket.co.il/javascript.js

    And my default stylesheet is:
    http://www.sheket.co.il/style.css

    (I apologize for possible jibrish- the website is in Hebrew...)

    Any help with these two problems would be greatly appreciated!

  • #2
    Regular Coder
    Join Date
    May 2010
    Location
    Bathurst, Australia
    Posts
    180
    Thanks
    1
    Thanked 22 Times in 22 Posts
    It's not really script problems, it's more html problems. You've attached the events to the anchor element, which has no height, width, or content. Try adding:
    Code:
    display:block;
    height:100px;
    width:100px;
    to your anchor elements and you'll see what i mean. It would be better to add this to your div though. But to be real proper look over this too http://www.quirksmode.org/js/events_advanced.html
    Disclaimer: I'm hungover 70% of the time i'm on here, any information given may not be correct, or even legible.

  • #3
    New Coder
    Join Date
    Aug 2011
    Posts
    16
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Thanks! Had to play around with conditional IE comments to make it work, but it looks great now.

    Any ideas on solving the second problem, with the browser size script?

  • #4
    New Coder
    Join Date
    Aug 2011
    Posts
    16
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Okay, after a few weeks of fiddling about it turns out that the answer is pretty simple -
    just add window.onload= changeLayout; to the beginning of the script, and the whole thing works in everything but Safari.

    Which of course brings me to my next question- does anyone have an idea how I can get it to work in safari? I ran the script debugger and it showed no errors, so I don't really know what's wrong.


  •  

    Posting Permissions

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