PDA

View Full Version : How to use addKeyListener?



lilolilo
1 Dec 2006, 1:01 PM
Hello,

I have tried to use addKeyListener in a input form to open an new tab, but see the error:

getEl("search-q").addKeyListener is not a function

my piece of code:

getEl('search-q').addKeyListener([13,10], function....);

tryanDLS
1 Dec 2006, 1:26 PM
Have you include the relevant js files? Refer to the samples, a number of them demo this functionality.

jack.slocum
1 Dec 2006, 1:45 PM
He's using the code from my blog which uses "addKeyListener" that was added to the Element object in the latest dev code which can be had from svn.

lilolilo
2 Dec 2006, 4:54 AM
With the last dev code fron svn works without problems, thanks!