Results 1 to 3 of 3

Thread: Uncaught TypeError: Object function getElementById() { [native code] } has no method

  1. #1

    Default Uncaught TypeError: Object function getElementById() { [native code] } has no method

    I am getting an error in my javaScript code. I created a ExtJs button and assigned a handler to it. The handler creates a ExtJs messageBox. The problem is, when the button is clicked, the messageBox is not created. When I used Chrome to debug I got this error:
    Code:
    "Uncaught TypeError: Object function getElementById() { [native code] } has no method 'addEventListener'"
    


    I have searched around but so far got nothing. Below is the code:
    Code:
    var fBtn1 = new Ext.Button({
        text: 'Forward',
        tooltip: 'Send this message to more recipients',
        handler : getBox
    });
    
    
    function getBox() {      
        Ext.MessageBox.confirm('hello', 'how is it');
    }


  2. #2
    Sencha User
    Join Date
    Jan 2011
    Posts
    549

    Default

    Use Firefox with FireBug installed, as that will provide much better debugging.

  3. #3
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    9,410

    Default

    Are you rendering the button to another container, or the body?

    Code:
    var fBtn1 = new Ext.Button({
        text: 'Forward',
        tooltip: 'Send this message to more recipients',
        handler : getBox,
        renderTo: Ext.getBody()
    });
    
    
    function getBox() {      
        Ext.MessageBox.confirm('hello', 'how is it');
    }?
    Scott.

Tags for this Thread

Posting Permissions

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