/ Published in: JavaScript
This uses prototype to intercept tab focus and place it on a button (or any other element). Firefox and Safari will bypass the button when tabbing through a form. Useful for buttons after textareas.
Expand |
Embed | Plain Text
Event.observe($('body'), 'keypress', function(event){ if(event.keyCode == Event.KEY_TAB) { $('sendMessage').focus(); Event.stop(event); }});
You need to login to post a comment.
