aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes dont need negative values in textbox Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "dont need negative values in textbox" Watch "dont need negative values in textbox" New topic
Author

dont need negative values in textbox

madhuri kunchala
Ranch Hand

Joined: Mar 30, 2010
Posts: 350
hi,
in my form...i had a textbox..in it,it should take only numbers,and decimals....that i did and it working fine...but if i wrongly enter +,-...it is taking...but i dnt need it....here is my code...can any help where to change my code..

login.jsp



login.js



thanks in advance.
madhuri kunchala
Ranch Hand

Joined: Mar 30, 2010
Posts: 350
any help
Aneesh Vijendran
Ranch Hand

Joined: Jun 29, 2008
Posts: 125
Hi,

You unnecessarily wrote so many lines of code. Your problem just takes 4 lines of code.



'txt1' is the id of the textbox

Hope this helps.


Cheers
Aneesh
madhuri kunchala
Ranch Hand

Joined: Mar 30, 2010
Posts: 350
hi Aneesh,
thanks for your reply i tried it..its working ....i'll implement in my project....thanks a lot...
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

And please, please stop using font tags :(
madhuri kunchala
Ranch Hand

Joined: Mar 30, 2010
Posts: 350
do you mean in my jsp page...or where..im using 'font tags'
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
<font color="#800000" size="">
madhuri kunchala
Ranch Hand

Joined: Mar 30, 2010
Posts: 350
k..i'll implement it..
 
jQuery in Action, 2nd edition
 
subject: dont need negative values in textbox