sry OOT ----- Original Message ----- From: "Alf Stockton" <alf@xxxxxxxxxxxxxx> To: "php windows" <php-windows@xxxxxxxxxxxxx> Sent: Tuesday, May 08, 2007 6:24 PM Subject: Re: Form and enter key > Dale Attree wrote: > > In your opening form tag > > > > <form onsubmit="CheckKey()"> > > > > In CheckKey, check if enter was hit, if so call your AJAX function. > > > > If the submit button was clicked, your keycode will be blank and then you > > can submit the form. > > i have some problem too and related to this topic.. user type a form and then he/she enter the form that he/she will enter the doctor name (there were 200 doctor). to small the code i use ajax, user can click on button next to the text form. which is open new window the main problem was i want to use shortcut. if the text form active, user can click F6 to open new window which is same as click on the button. ================================== >> > > This means that not only do I want to "Prevent Enter From Submitting > > Form" but also cause enter to call Ajax. > > In Ajax I can then > > if (windows.event.keyCode != 13) return; or similar. i currios about this.. when i click F2, then new window will show up. suggestion for TS, how about not using submit but using <a href=.... onclick=refreshAllData()>\ user can't click on submit but must click on the link to enter the data. > -- > Regards, > Alf Stockton www.stockton.co.za > > Q: What's a light-year? > A: One-third less calories than a regular year. > My email disclaimer is available at www.stockton.co.za/disclaimer.html > > -- > PHP Windows Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php