User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the ColdFusion section within the Web Development category of DaniWeb, a massive community of 373,937 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 2,484 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 ColdFusion advertiser:

Automate undisabled a “submit button”?

Join Date: Feb 2008
Posts: 68
Reputation: cmhampton is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 9
cmhampton's Avatar
cmhampton cmhampton is offline Offline
Junior Poster in Training

Re: Automate undisabled a “submit button”?

  #2  
Apr 10th, 2008
You need to use a javascript function for this:

  1. function ChangeButtonStatus()
  2. {
  3. if (document.getElementById("Text").value.length > 0)
  4. {
  5. document.getElementById("submit").disabled = false;
  6. }
  7. else
  8. {
  9. document.getElementById("submit").disabled = true;
  10. }
  11. }
  12.  

Then in your form, add an OnBlur event to the textbox:

  1. <cfinput type="text" name="Text" id="Text" OnBlur="ChangeButtonStatus()">
Reply With Quote  
All times are GMT -4. The time now is 6:43 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC