469,320 Members | 2,140 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,320 developers. It's quick & easy.

validate textbox

i have two radio button one yes and another no i want enable textbox only when the user select the yes button
thanks
Apr 12 '09 #1
3 1086
Dormilich
8,651 Expert Mod 8TB
put an onchange event on the yes button that displays/enables the textbox if the checked property is set to true.
Apr 12 '09 #2
i have this code but its let enable it if u press yes but it doesnt disable it back if user press no var currentEnabled = null;
Expand|Select|Wrap|Line Numbers
  1. function enableElement(elem) {
  2. if (currentEnabled) {
  3. currentEnabled.disabled = true;
  4. }
  5. elem.disabled = false;
  6. currentEnabled = elem;
  7. }
Apr 12 '09 #3
thanks for help my code its working
Apr 13 '09 #4

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

3 posts views Thread by rodger | last post: by
5 posts views Thread by Jeff Evans | last post: by
11 posts views Thread by wolf | last post: by
9 posts views Thread by B-Dog | last post: by
3 posts views Thread by Jeff Jarrell | last post: by
reply views Thread by suresh191 | last post: by
reply views Thread by mdpf | last post: by
reply views Thread by harlem98 | last post: by
reply views Thread by listenups61195 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.