Hi Friends, Can some one please help me in telling how to stop relaoding of the page while clicking form submit. Regards, Vishal
you would want to check if the submit button has been pressed and if it has you need to check the beforeunload and return false to stop it. /* Check if button has been clicked first */ window.onbeforeunload = function (e) { var e = e || window.event; // For IE and Firefox if (e) { e.returnValue = 'Leaving the page'; } // For Safari return 'Leaving the page'; }; Code (markup): //Got the code from a stackoverload answer but the principles are the same
Might I ask why you even consider it an issue in the first place? Or do you have some fat bloated train wreck of how not to build a website where there's so much garbage in the markup it takes forever?