homepage Welcome to WebmasterWorld Guest from 54.237.95.6
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Accredited PayPal World Seller

Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
Forum Library, Charter, Moderator: open

JavaScript and AJAX Forum

    
Help! Alert and confirm dialog boxes just flash on IE8!
They open for a split second and then close!
add more milk




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

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:


<form>

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

</form>


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?

Thanks!

 

add more milk




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

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?

Fotiman




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

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

add more milk




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

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!

MonkeyFace




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

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?

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About
© Webmaster World 1996-2014 all rights reserved