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!