Is it possible to disable my submit button when my javascript timer has finished and has showed its end message.

This is my form

<form id="MakeBid" action="MakeBid.php" method="POST">
<input type="hidden" name="propertyID" value ="1"/>
<div>Bid Now <input type="text" name="pricesoldfor"/></div> 
<input type="submit" value="Submit" /> 
</form>

The java script message will be Auction ended when the timer reaches a specific date.

Thanks

To disable the submit button in JavaScript try something like...

document.getElementById("mySubmit").disabled = true;

...where 'mySubmit' is an ID assigned to your input element...

<input id="mySubmit" type="submit" value="Submit" />

Further info here... http://www.w3schools.com/jsref/prop_submit_disabled.asp

Thanks for the answer, what would the code be if the form was on another php page?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.