Printable Version of Topic

Click here to view this topic in its original format

HTMLHelp Forums _ Client-side Scripting _ How to stop alerts

Posted by: msucimaster Mar 23 2021, 06:39 AM

Occasionally it happens to me that I put some alert in javascript in order to debug it and then I find myself to have to press ok for a hundred times.

Sure, there are lots of ways not to get in this situation. But sometimes my guard is down and it happens again.

So my question is: how can I break off such a situation.

Think of

QUOTE
for(i=1;i<100;i++) alert(i);

Posted by: pandy Mar 23 2021, 07:18 AM

To my knowledge you can't.

If you press and hold down ALT+F4 you might kill the browser process before you have to see all alerts and thus avoid using Task Manager.

Posted by: Christian J Mar 23 2021, 08:52 AM

Some browsers (at least Firefox) offer to stop showing further alerts after a few repetions.

Posted by: pandy Mar 23 2021, 11:13 AM

Right! Didn't know about that. I tried it. It worked but it was hard to get rid of that confirmation window if I didn't answer I would like FF to suppress further alerts. laugh.gif

Posted by: Christian J Mar 23 2021, 02:31 PM

QUOTE(pandy @ Mar 23 2021, 05:13 PM) *

it was hard to get rid of that confirmation window if I didn't answer I would like FF to suppress further alerts. laugh.gif

Huh? blink.gif

Posted by: pandy Mar 23 2021, 02:45 PM

FF spawns a window that looks much like a JS alert. I'm asked if I want to stop further alerts. But there's only one choice and an OK button. If I don't want to stop them, then what do I do?

Or so I thought. But I realize now that what I see is my own alert to which FF has added the question about if I want to stop the alerts and a checkbox.

Posted by: Christian J Mar 23 2021, 06:45 PM

Yes, if you don't tick the checkbox the alerts should continue.

Posted by: pandy Mar 24 2021, 05:20 AM

Yeah, I got it after a while. But at first I didn't understand it was the JS alert I saw. They look like anything now and FF doesn't even label them JavaScript anymore. Just a plain little window.

Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)