|
Posted by subp on 05/03/06 18:07
If I understand you right, you want your submit function to be
triggered by pressing the enter key on the keyboard, right?
Adding javascript to the page like this might be what you need:
function fetchKey() {
if (window.event.keyCode == 13) {
// submit code in here
}
}
document.onkeydown=fetchKey;
So, when a key is entered, it checks to see if it's the enter key (13)
and if it is, it does your submit. I'm also curious why you wouldn't
just use a real submit button. If it has to be a get instead of a
post, then just add the method="get" attribute to your form. Just
guessing that that might be one reason why you would want a link
instead of a button.
Navigation:
[Reply to this message]
|