I have very intense php script that takes from 5 - 30 seconds to execute, depending on user request.
So I want to prevent people from clicking "search" twice, so I decided to glue it by disabling button on click.
Here is my code:
And yet my form submit:
<input type="submit" value="Search" id="search1" onclick="disableButton('search1');"></input></form>
But, for some reason it won't proceed. JS executes fine, but form won't go on. What is wrong?
Ok, found the solution. Instead I tried onsubmit in <form > and it works:
<form action="search.php?action=subscribers" method="post" onsubmit="disableButton('search1');">