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? Link to comment https://forums.phpfreaks.com/topic/94622-enable-input-tag/ Share on other sites More sharing options...
haku Posted March 6, 2008 Share Posted March 6, 2008 document.forms['register'].submit.disabled=""; Link to comment https://forums.phpfreaks.com/topic/94622-enable-input-tag/#findComment-484601 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 Link to comment https://forums.phpfreaks.com/topic/94622-enable-input-tag/#findComment-484611 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.