Prasad Godbole

Prasad Godbole

  • NA
  • 153
  • 170.9k

how to handle javascript keypress event for tablet-PC

Dec 5 2013 7:34 AM
Hi,

We are using following simple HTML element on one web page

<input type="text" class="txtBig" onkeypress="return validate_keypress(event,this.form);" maxlength="150" name="txt_search" id="txt_search" size="35" onblur="SearchBlur(this);" onfocus="SearchFocus(this);" value="Search for a Housing Association" onclick="HideLoginOnOtherClick();" />

If user press key other than enter then  we are setting text box text blank. This works fine with all browsers but its not working with tablet-pc.

Can anyone please advise how to handle keypress event for tablet-pc through normal javascript or jquery ?

This is general issue so I have posted it here in case if someone has already faced and resolved it.

Thanks
Prasad

Answers (2)