I have a sign up form in my page. So I want when the user accidentally refresh or close tab or browser and the visitor has written something in someone
<input type="text" placeholder="something"/>
then appear:
return "you have to fill the whole form";
Everything works, but I have a problem with the button! The button has no Javascript and no jQuery function. My PHP-script checks all these inputs and refresh the page. The visitor fill the whole form and click signup and appear.
return "you have to fill the whole form";
This shouldn't be like this and I cannot share the PHP code because of the security of the webpage.
Maybe can I fix this with the right JS or jQuery code!
jsFiddle Demo: http://jsfiddle.net/dV9sU/9/
PS: Sorry for my English.