Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

dont need negative values in textbox

 
madhuri kunchala
Ranch Hand
Posts: 350
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 350
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
any help
 
Aneesh Vijendran
Ranch Hand
Posts: 125
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

 
madhuri kunchala
Ranch Hand
Posts: 350
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi Aneesh,
thanks for your reply i tried it..its working ....i'll implement in my project....thanks a lot...
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And please, please stop using font tags :(
 
madhuri kunchala
Ranch Hand
Posts: 350
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
do you mean in my jsp page...or where..im using 'font tags'
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<font color="#800000" size="">
 
madhuri kunchala
Ranch Hand
Posts: 350
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
k..i'll implement it..
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic