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! Link to comment https://forums.phpfreaks.com/topic/32112-how-can-i/ 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. Link to comment https://forums.phpfreaks.com/topic/32112-how-can-i/#findComment-149210 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.