validating textfield with +ve/-ve values using 2 radiobuttons
Joined: Apr 26, 2007
In my jsp i had a textfield and 2 radio buttons ie.,
Name of the textfield = pricePeriod and two radio buttons : 1. Yes 2. No
By Default "pricePeriod = 0" and selected as "yes" Radio Button user has a mechanism to change the values if i enter "Negative value" then "Yes" should be selected if i change the value as "Positive value " in the textfield then "No" should be selected. can anybody tell me how can i go further in this regard,
please, give me reply asap , urgent....
Joined: Feb 22, 2005
You can use the 'onBlur' event of the textfield to invoke a function which will check the textfield's value and accordingly set the 'checked' attribute of the corresponding radio button to 'true'.