User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the JavaScript / DHTML / AJAX section within the Web Development category of DaniWeb, a massive community of 331,570 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 4,706 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JavaScript / DHTML / AJAX advertiser: Lunarpages Web Hosting

radio button vs textbox ala Javascript

Join Date: Mar 2008
Location: South Africa
Posts: 118
Reputation: Traicey is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 12
Traicey's Avatar
Traicey Traicey is offline Offline
Junior Poster

Re: radio button vs textbox ala Javascript

  #2  
Mar 25th, 2008
There are many ways to do that but I'd rather use this method

  1. <script language ="javascript>
  2. <!--
  3. function whatever()
  4. {
  5. var TextBoxName = document.FormName.TextBoxName.disabled = true;
  6. var radioButtonNameYes = false;
  7. var radioButtonNameNo = false;
  8. if(document.nameOftheForm.radioButtonName(yes).checked)
  9. {
  10. radioButtonName = true;
  11. document.FormName.textBoxName.disabled=false;
  12. document.FormName.textBoxname.value = " ";
  13. } else
  14. {
  15. //do the "No" radio button
  16. }
  17.  
  18. }
  19. //-->
  20.  
  21. </script>
  22.  
Last edited by Traicey : Mar 25th, 2008 at 9:52 am.
You know the world is going crazy when the best rapper is a white guy, the best golfer is a black guy, the tallest guy in the NBA is Chinese, the Swiss hold the America's Cup, France is accusing the U.S. of arrogance, Germany doesn't want to go to war, and the three most powerful men in America are named 'Bush', 'Dick', and 'Colon'. By Chris Rock
Reply With Quote  
All times are GMT -4. The time now is 10:57 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC