• Post Reply Bookmark Topic Watch Topic
  • New Topic

Object Expected error in javascript  RSS feed

GirishPatil patil
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I am new to java. I am getting "Object Expected" error while processing jsp page.
I want to modify the text field so that only number and one dot(.) should be entered.
I have one function and i m calling it as "onkeypress" event.

Below is the function....
function isNumberKey(evt)
var charCode;
charCode = (evt.which) ? evt.which : event.keyCode
if (charCode != 46 && charCode > 31 && (charCode < 48 || charCode > 57))
return false;

return true;

and below are html tags...
<td>Total No Of Customers  *</td>
<td><html:text property="noOfCustomersUnit" onkeypress="return isNumberKey(event)" style="width:160px"/></td>

plzz help......
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!