This week's book giveaways are in the AI and JavaScript forums.
We're giving away four copies each of GANs in Action and WebAssembly in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of GANs in ActionE this week in the AI forum
or WebAssembly in Action in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
  • Knute Snortum
Sheriffs:
  • Liutauras Vilda
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Joe Ess
  • salvin francis
  • fred rosenberger

Object Expected error in javascript

 
Greenhorn
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)
{
alert("here");
var charCode;
clearerror();
charCode = (evt.which) ? evt.which : event.keyCode
alert("here");
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......
 
Not so fast naughty spawn! I want you to know about
Sauce Labs - World's Largest Continuous Testing Cloud for Websites and Mobile Apps
https://coderanch.com/t/722574/Sauce-Labs-World-Largest-Continuous
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!