Click to See Complete Forum and Search --> : Stop page processing after alert


tcovert
01-16-2004, 02:51 PM
In some browsers, when I have an alert popup on an action, once the user hits "OK", the page reloads itself.

Is there a way to just have the page Stop after the "OK" button is hit and the alert is cleared? To have it discontinue processing anything further, and not reload itself?

Mr J
01-17-2004, 01:11 PM
Is this a page you are creating or pages in general?

tcovert
01-17-2004, 01:16 PM
A page I am building. It works in IE but not in Safari.

AdamGundry
01-17-2004, 02:04 PM
By an "action", do you mean a form event handler? If so, the form may be submitting, causing the page to reload. To prevent it, use "return false" in your form's onsubmit event handler.

Adam

tcovert
01-17-2004, 03:15 PM
Okay, it is fixed.

This is what I am doing now:

<a href="" onclick="check();return false;">


<input type="Button" value="Submit" border="0"></a>

The problem was that I didn't have the "return false;" after "check();"

Thanks.