Jump to content

form


alin19

Recommended Posts

<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

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.