File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes HTML, CSS and JavaScript and the fly likes Object Expected error in javascript Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Object Expected error in javascript" Watch "Object Expected error in javascript" New topic

Object Expected error in javascript

GirishPatil patil

Joined: Jul 19, 2012
Posts: 3
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......
jQuery in Action, 3rd edition
subject: Object Expected error in javascript
It's not a secret anymore!