SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Enthusiast
    Join Date
    May 2007
    Posts
    92
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Unhappy need help on this JS error code in IE

    window.onscroll = self.setTimeout("self.placeIt('layer1')",500);

    window.onscroll has an error in internet explorer 6
    "Not implemented"

    it works fine in firefox

    How can I resolve this?

    thanks

  2. #2
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,716
    Mentioned
    103 Post(s)
    Tagged
    4 Thread(s)
    The return value of setTimeout isn't acceptable.

    Try placing the code inside an anonymous function instead.

    Code Javascript:
    window.onscroll = function () {
        self.setTimeout("self.placeIt('layer1')",500);
    }
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript


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
  •