dojoattachevent="onkeyup: checkForEnter"
Then, in your widget logic, all you need to do is:
checkForEnter: function(keyEvent) {
if(keyEvent.keyCode == 13) {
if(!dojo.isFF) {
if(this._validateForm()) {
this._createAccount();
}
}
}
}
Oddly enough, Firefox is able to recognize the enter key and submits the form all by itself.
dojo campus has quite a few keys defined so you can capture a lot of what your users are trying to achieve with your web application.
No comments:
Post a Comment