You are here: Re: Fake submit button & return « HTML « IT news, forums, messages
Re: Fake submit button & return

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация