alin19 Posted February 2, 2008 Share Posted February 2, 2008 <html> <script language="javascript" type="text/javascript"> <!-- function test() { with (document.forms.form1) { reset.disabled=false } } --> </script> <body> <form action="" method="POST" name="form1"> <input type="text" name="nume" value="nume" onchange="test()"> <input type="submit" name="submit" value="submit" onclick="test()"> <input type="reset" name="reset" value="reset" disabled=true> </form> </body> </html> if i click on the submit buton , the reset buton disabled go to false but go to true right away, whay is this? Link to comment https://forums.phpfreaks.com/topic/89050-form/ Share on other sites More sharing options...
phpQuestioner Posted February 4, 2008 Share Posted February 4, 2008 Try this instead and see if this is what your looking for. <script language="javascript"> function lockout() { document.getElementById('clear').disabled = true; } </script> <form action="" method="POST" name="form1"> <input type="text" name="nume" value="nume" onchange="test()"> <input type="submit" name="submit" value="submit" onclick="lockout()"> <input type="reset" name="reset" value="reset" id="clear"> </form> Link to comment https://forums.phpfreaks.com/topic/89050-form/#findComment-457365 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.