After someone presses the submit button, i want to disable it. How do i do that?
Printable View
After someone presses the submit button, i want to disable it. How do i do that?
I'm not sure if this is what you're after...
<INPUT TYPE="submit" onClick="this.disabled=true">
Paul
I think thats javascript right, is there anyway to do it without a client side script? The site is done in PHP so if there is some way to do it in PHP, that would be great.
Sorry, I don't know anything about PHP. Could your PHP script write the JavaScript for you? You could do a similar thing on load:
<BODY onLoad="frmWhatever.btnSubmit.disabled=true">
where...
<FORM NAME="frmWhatever">
<INPUT NAME="btnSubmit" TYPE="submit">
</FORM>
Paul
The reason i dont want to use javascript, is cuz not everyone has javascript enabled. So if theres some way to do it in HTML or server side, then it will work with all browsers.
Well if you don't use client-side scripting then you have absolutely no control over the page the user is viewing unless they request something from you, which will happen when they click the submit button. You could do something in the page that the submit button submits to, but I don't quite know what you're doing so I can't really say much more about that.
you could have a normal button?
then have it check if it should submit or not?