#1) how can I disable a form button when it has been clicked/submitted
I know it's javascript.. like this.form.buttonname.disabled='true'
something like that
#2) is it possible to have people not be able to refresh a page, or if they do... not to repeat the $_POST action. I could use an intermediate page but that would be a lot of work
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
scrotaye wrote:#2) is it possible to have people not be able to refresh a page, or if they do... not to repeat the $_POST action. I could use an intermediate page but that would be a lot of work
In summary, you basically have the post results go to a processing page, and upon processing, you redirect to a "change made" page. If they back button, it goes to the original form (not the processing page), and if they refresh, it just redisplays the "change made" (without making a change). Best of both worlds.
function disableForm(formname) {
formname.Submit.disabled=true;
formname.Submit.value="Wait...";
}
<form name="myForm" onSubmit="disableForm(myForm);">
And for the second problem, i went ahead and redirected to an intermediate page, like Roja mentioned.
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
I read the PRG pattern referred by Roja. It looks good, I think something like this should be done instead of constructing individual redirection pages.