Results 1 to 3 of 3

Thread: KeyMap function

  1. #1
    Ext User
    Join Date
    Mar 2008
    Posts
    20

    Default KeyMap function

    Hi, I am a new user of Extjs.

    I found that KeyMap function is very useful in the API Doc, but when i tried to use the code that the Document mention:
    PHP Code:
    var map = new Ext.KeyMap("my-element", {
        
    key13// or Ext.EventObject.ENTER
        
    fnmyHandler,
        
    scopethis
    });

     function 
    myHandler(){
        
    alert("Test");
     }; 
    the following error returns:
    this.el has no properties

    do I need to set somthing else to make it activate?

  2. #2
    Sencha Premium User evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    19,256

    Default

    1) Is your code wrapped in an onReady block?
    2) Do you have an element on your page with an id of 'my-element'?

  3. #3
    Ext User
    Join Date
    Mar 2008
    Posts
    20

    Default

    Quote Originally Posted by evant View Post
    1) Is your code wrapped in an onReady block?
    2) Do you have an element on your page with an id of 'my-element'?
    oh i forget to change the second statement, it's okay now, thanks a lot!

Posting Permissions

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