Help! Hi, everyone! I have this problem: There is a “textbox†and a “submit†button. “Submit button†is disabled until something is written within “text boxâ€. I am not able to do this switch. Could anybody help me? Here you are the code: <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> </head> <body> <cfform name="form1" id="form1" method="post" action=""> <cfinput type="text" name="Text" id="Text"> <cfinput type="submit" name="submit" disabled="disabled" id="submit" value="Submit"> </cfform> </body> </html> Thank you!
Check out this link and see if it helps you... http://bytes.com/forum/thread152399.html Do you need this for validation? You really need some server side validation if you decied to use this peice of javascript...
I dont belive so. Coldfusion only runs when a page is requested from the server. So unless the person hits the submit button, no coldfusion code will run. Thats why you need javascript or anyother "client side" script to handel this type of function. CFML is strictly "server side"