I passing the following form to an Ajax search routine  "doSearch()".

<form name="searchform">
<input type="text" name="Search_Term" onsubmit = "return doSearch()"
onkeypress= "return submitenter(event)">
<img name="button" img src = "spotlight.png" width="35"
height="32"align = "middle" value="Find" onClick="doSearch()">
</form>

I am trapping the enter and return key using this function:

function submitenter(event)
{
var keycode;
if (window.event) keycode = window.event.keyCode;
else if (e) keycode = e.which;
else return true;

if (keycode == 13)
   {
   doSearch();
   return false;
   }
else
   return true;
}

My question: how would I alter this function to also handle the
keycode from Apple's Search key on the iPhones's virtural keyboard.

Note that the form does not have a submit button but a plain image
button

The actual demo code is running at this url: http://www.passport-i.com

Many thanks again for any suggestions!


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"iPhoneWebDev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/iphonewebdev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to