Closed
Bug 274593
Opened 20 years ago
Closed 20 years ago
FireFox sent into infinate loop via JavaScript browser check
Categories
(Toolkit Graveyard :: Error Console, defect)
Tracking
(Not tracked)
RESOLVED
DUPLICATE
of bug 225302
People
(Reporter: bugzilla, Assigned: bugs)
Details
Ran across this failure on an internal application at work. I'm no JavaScript guru, so I can't 100% tell if this is poor coding, or if FireFox is not handling the JavaScript correctly. Use the following HTML code to duplicate: --------------------- <html> <head> <script Language="JavaScript"> function checkBrowser(){ if (navigator.appName != "Microsoft Internet Explorer"){ navi = navigator.appName; ver = navigator.Version; alert("Sorry " + navi + " is an unauthorized browser for this application Please use Microsoft Internet Explorer"); window.location = "http://www.google.com"; } } </script> </head> <title>Crash Firefox</title> <body onload="checkBrowser()" onfocus="checkBrowser()"> Prepare to crash!! </body> </html> ---------------------
Reporter | ||
Comment 1•20 years ago
|
||
I modified the text (so that IE would fail), and tried it in Internet Explorer, and IE seems to handle the JavaScript ok. If you hit the Ok button the alert quickly, it will loop a couple of times, but eventually (2-3 times), google.com loads. For some reason, I don't think FireFox is letting the script get all the way to that window.location, it is halting at the alert it seems.
Comment 2•20 years ago
|
||
I think this is basically the same as bug 225302.
Reporter | ||
Comment 3•20 years ago
|
||
Checked the suggested duplicate, and I agree. Changing to duplicate. *** This bug has been marked as a duplicate of 225302 ***
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → DUPLICATE
Updated•16 years ago
|
Product: Firefox → Toolkit
Updated•8 years ago
|
Product: Toolkit → Toolkit Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•