SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Enthusiast
    Join Date
    Mar 2002
    Location
    Toronto, Canada
    Posts
    92
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    JS Errors in NETSCAPE... PLEASE HELP!

    Hey all!

    I'm encountering a MAJOR error with a javascript image-scroller... I originally had the scroller setup in a layer, but have now moved it into a table cell.

    Anyways, the problem I encounter is when viewing the page in NETSCAPE 4.x and 6.x...

    The page loads, but the cell containing the scroller does not. In 4.x, it appears partially, and in 6.x, it is completely gone.

    I also received JS errors in NS 4.x:
    1) document [imgName] has no properties
    2) moveright not defined

    I cannot figure out why I'm receiving these errors, or even why the scroller does not appear.

    Any help would be greatly appreciated.

    I have a temporary page setup here http://members.rogers.com/frank.mann...portfolio.html Any help would be appreciated!


    TIA!

    ...Frank
    ...Shakes


    "Whether you think you can, or you think you can't, you're right!"

  2. #2
    What? Maelstrom's Avatar
    Join Date
    Oct 2001
    Location
    Whistler BC originally from Guelph Ontario
    Posts
    2,175
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You are currently accessing them

    document[image].src=

    That is IE's way of butchering the dom try

    document.images[image].src

    instead. This should fix the problem with Netscape
    Maelstrom Personal - Apparition Visions
    Development - PhP || Mysql || Zend || Devshed
    Unix - FreeBSD || FreeBsdForums || Man Pages
    They made me a sitepoint Mentor - Feel free to PM me or Email me and I will see if I can help.

  3. #3
    SitePoint Enthusiast
    Join Date
    Mar 2002
    Location
    Toronto, Canada
    Posts
    92
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by Maelstrom
    You are currently accessing them

    document[image].src=

    That is IE's way of butchering the dom try

    document.images[image].src

    instead. This should fix the problem with Netscape
    Maelstrom,

    I changed the line to what you suggested, and unfortunately, no luck... Am I missing something else here?

    Just to be sure, I still need the "=" after document.images[image].src, right?

    Any other suggestions would be helpful!

    Thanks,
    ...Frank
    ...Shakes


    "Whether you think you can, or you think you can't, you're right!"

  4. #4
    What? Maelstrom's Avatar
    Join Date
    Oct 2001
    Location
    Whistler BC originally from Guelph Ontario
    Posts
    2,175
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by FrankieShakes


    Maelstrom,

    I changed the line to what you suggested, and unfortunately, no luck... Am I missing something else here?

    Just to be sure, I still need the "=" after document.images[image].src, right?

    Any other suggestions would be helpful!

    Thanks,
    ...Frank
    There were a number of lines. Anywhere you see document[image].src switch it too document.images[image].src

    Leave the rest of the code the same.

    Give this article a read as it applys directly to you

    http://www.sitepointforums.com/showt...threadid=30006

    And actually looking at that code I 'may' have had it wrong. ...sorry bout that.
    Maelstrom Personal - Apparition Visions
    Development - PhP || Mysql || Zend || Devshed
    Unix - FreeBSD || FreeBsdForums || Man Pages
    They made me a sitepoint Mentor - Feel free to PM me or Email me and I will see if I can help.

  5. #5
    SitePoint Enthusiast
    Join Date
    Mar 2002
    Location
    Toronto, Canada
    Posts
    92
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Maelstrom,

    No luck... I've changed the code to this:


    function imgOn(imgName) {
    if (document.images) {
    document.images[imgName].src = eval(imgName + "on.src");
    document.images["common"].src = eval(imgName + "ad.src");
    }
    }


    Any suggestions as to why it's not working... I'm still getting this error:

    "document.images[imgName] has no properties."


    ...Frank
    ...Shakes


    "Whether you think you can, or you think you can't, you're right!"


Bookmarks

Posting Permissions

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