Pezmc Posted December 28, 2006 Share Posted December 28, 2006 How can I after five seconds enable a submit button in a form?This is how far i got[code]<script language="javascript">function enableField(){document.form1.Submit.disabled=false;} </script><form name="form1" method="post" action=""> yer <input type="submit" disabled="true" name="Submit" value="Submit"></form>[/code]Help appreciated! Quote Link to comment Share on other sites More sharing options...
lszanto Posted December 29, 2006 Share Posted December 29, 2006 You just use setTimeout()So:[code]<script language="javascript"><!-- //var timer = setTimeout("document.form1.Submit.disabled = false",5000)// --></script><form name="form1" method="post" action=""> yer <input type="submit" name="Submit" value="Submit"></form>[/code]Hope it helps. 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.