| Author |
validating textfield with +ve/-ve values using 2 radiobuttons
|
soma lingam
Greenhorn
Joined: Apr 26, 2007
Posts: 19
|
|
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....
|
 |
Anirvan Majumdar
Ranch Hand
Joined: Feb 22, 2005
Posts: 261
|
|
|
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'.
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56207
|
|
Originally posted by soma lingam: please, give me reply asap , urgent....
Please read this for information on why putting such phrases into your posts isn't a good idea. [ February 06, 2008: Message edited by: Bear Bibeault ]
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
 |
|
|
subject: validating textfield with +ve/-ve values using 2 radiobuttons
|
|
|