Northern Flame Posted March 6, 2008 Share Posted March 6, 2008 I have a function that either enables or disables an input tag when clicked on. I know how to disable the tag but how can i enable it? heres my code: function activateSubmit(){ var state = document.forms['register'].agree.value; switch(state){ case 0: document.forms['register'].agree.value=1; document.forms['register'].submit.disabled="no"; // Heres where i want to enable it! break; case 1: document.forms['register'].agree.value=0; document.forms['register'].submit.disabled="disabled"; break; } } the code above works when i want to disable the input tag, but how do i enable it? Quote Link to comment Share on other sites More sharing options...
haku Posted March 6, 2008 Share Posted March 6, 2008 document.forms['register'].submit.disabled=""; Quote Link to comment Share on other sites More sharing options...
Northern Flame Posted March 6, 2008 Author Share Posted March 6, 2008 oh lol alright thanks! that was easier than i thought Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.