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? Quote Link to comment 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> 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.