Welcome to WebmasterWorld Guest from

Forum Moderators: open

Message Too Old, No Replies

Help! Alert and confirm dialog boxes just flash on IE8!

They open for a split second and then close!


add more milk

8:03 pm on Feb 4, 2011 (gmt 0)

5+ Year Member

Hey guys,

Can anyone help me with this?

I use Javascript to validate form entries. It works well on Firefox. However, on Internet Explorer 8 (on Windows 7), the alert and confirm dialog boxes behave very strangely:

They would open for a split second and then close on their own. You can't even read the message because they flash so fast. But you can hear the sound a couple of seconds later.

Worse, the confirm dialog box would sometimes select the OK option on its own!

My original codes are long, but I tested it with this little code below and the problem still persists:


<input onClick="alert('test');" type="image" src="/image/button.gif" width="100" height="50" border="0">


I also tried to add "return false" or "return true" after alert() but still same problem.

What is wrong with this code? How can I make the dialog box work normally?


add more milk

8:15 pm on Feb 4, 2011 (gmt 0)

5+ Year Member

OK... even the IE's own error box doesn't want to stay on!

When I had an error on my javascript, IE showed "Error on Page" alert on the lower left corner. When I clicked it, a dialog box to show errors popped up but closed right away, just like the alert and confirm boxes.

Something wrong with IE8?


8:45 pm on Feb 4, 2011 (gmt 0)

WebmasterWorld Senior Member fotiman is a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month

It sounds like malware to me. Perhaps you have an IE Toolbar or plugin installed that is misbehaving?

add more milk

9:14 pm on Feb 4, 2011 (gmt 0)

5+ Year Member

You might me right. I went to a couple of those javascript tutorial websites to try their alert and confirm dialog boxes and I got the same problem! So it's my browser! But I don't know what causes the problem. I've always been using Firefox since I got this computer and IE just sits there unused. And Windows Update doesn't show anything new. Thanks for your help!


6:53 pm on Feb 10, 2011 (gmt 0)

5+ Year Member

We need to get rid of IE altogether. We should stop supporting it no matter what. Well, maybe charge and additional $150/hr for IE support.

Try some DHTML based modal dialogs instead?

Featured Threads

Hot Threads This Week

Hot Threads This Month