Ask Me Help Desk

Ask Me Help Desk (https://www.askmehelpdesk.com/forum.php)
-   Javascript (https://www.askmehelpdesk.com/forumdisplay.php?f=452)
-   -   This.getXY is not a function (https://www.askmehelpdesk.com/showthread.php?t=387148)

  • Aug 15, 2009, 01:09 PM
    sonicseaweed
    This.getXY is not a function
    So I'm working on this script and I get an error I cannot understand. The script it complicated (800+ lines), but here is what it boils down to

    Code:

    var someNamespace = {
     
      getXY : function(event) {
        // do some stuff
      }

      where_Am_I : function(event) {
        // get coordinates
        this.getXY(event);
        // do stuff...
      }

      start_process : function(event) {
        this.where_Am_I(event);
        document.getElementById('foo').onmousemove = this.where_Am_I;
      } 

    };

    Start_process is the function that is called. The first call to getXY works fine, but then I get a "is not a function" error from Firefox and a type error from opera when I move my mouse. Notice that where_Am_I is still being registered as a function, but getXY that is called from within it complains..

    Any ideas?

  • All times are GMT -7. The time now is 11:34 PM.