WWW
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
Go Back   Web Development Archives FAQs WWW

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Web Development Archives Sponsor:
  #1  
Old March 7th, 2008, 03:23 AM
gsrao27 gsrao27 is offline
Registered User
Dev Archives Newbie (0 - 499 posts)
 
Join Date: Mar 2008
Posts: 1 gsrao27 User rank is Just a Lowly Private (1 - 20 Reputation Level)  
Time spent in forums: 32 m 56 sec
Reputation Power: 0
Validating -ve/+ve value in the textfield depending on selected radio button

In my jsp page i had One TextField (Say: Amount) and a drop down Box (Say: Months) and two radio buttons (Say 1. Negative 2. Positive)

STEP: 1

By default the "Amount Field is displayed by "0" and dropdown is selected to "Some month" and "Negative" radio button is selected.

I want to validate in such a way that
If i edit the "Amount textfield" with negative value (i.e., Ex: -273) and tabbing out it should not throw an error (Ex: "Invalid data")
because the "Negative" radio button is already clicked. ( see above mentioned STEP:1)

but when u click "Positive" radio button it should through error msg "Invalid data" and also the "Drop down" what is selected should be "disabled"
and the cursor should focus on the "AMount" textfield

If i enter "Positive value" in "AMount field" (Ex: 233) when "Positive radio button" is selected it shouldn't through error msg
if i select "Negative Radio button" then "Drop down" should be enabled and the cursor should point to the "Amount Field".

Note: the values should not be cleared in the "Amount textfield" in any of the scenarios
it should not take any invalid special characters say "@#$!*&^" etc.,

can any body suggest me to implement by giving example

Reply With Quote
Reply

Viewing: Web Development Archives FAQs WWW > Validating -ve/+ve value in the textfield depending on selected radio button


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway