SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Thread: Mootools Error

Hybrid View

  1. #1
    SitePoint Member
    Join Date
    Jul 2005
    Location
    Texas,USA
    Posts
    23
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Mootools Error

    Hi

    I got the following problem in my site: http://bit.ly/HxxMSN
    When we click on the sub links, it should slide but its giving a JS error now: currentHandle is null

    PHP Code:
    onWalk: function(currentItem,currentHandle){
                    
    this.handles.removeClass('selected');
                    
    currentHandle.addClass('selected'); 

    It worked well in early IE6 and other old browsers, but not in the new ones. Let me know.

    Cheers!
    Last edited by paul_wilkins; Apr 13, 2012 at 16:11. Reason: Link shortener for privacy

  2. #2
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,705
    Mentioned
    102 Post(s)
    Tagged
    4 Thread(s)
    The issue is happening in this particular piece of the code.

    Code:
    onWalk: function(currentItem,currentHandle){
        this.handles.removeClass('selected');
        currentHandle.addClass('selected');
    }
    The variables are all good up until the removeClass part is performed.
    For some reason, the removeClass method seems to also remove what currentHandles references.
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript

  3. #3
    SitePoint Member
    Join Date
    Jul 2005
    Location
    Texas,USA
    Posts
    23
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    So what do you suggest?

  4. #4
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,705
    Mentioned
    102 Post(s)
    Tagged
    4 Thread(s)
    Quote Originally Posted by icon4tech View Post
    So what do you suggest?
    I don't know much at all about mootools, but hoopefully what I've done is to help provide info so that someone else who does know can help.
    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
  •