Closed Bug 439464 Opened 17 years ago Closed 17 years ago

GetElementById fails in Firefox and works in IE.

Categories

(Firefox :: General, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: Jack.Toering, Unassigned)

Details

Attachments

(1 file)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.14) Gecko/20080404 Firefox/2.0.0.14 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.14) Gecko/20080404 Firefox/2.0.0.14 GetElementById fails every time in Firefox, and works every time in IE. Simply run the source code shown below Reproducible: Always Steps to Reproduce: 1. Load up html file IE. Click the Reset Code Button. 2. Load up html file in Firefox and click the Reset Code Button. Actual Results: IE: No error Firefox: captcha_iframe is not defined. Expected Results: IE: No Error FireFox: No Error <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <head> <title>Untitled Document</title> </head> <body> <div style="float:left;clear:both;"> <form id="form2"> <input type="button" value="Reset code" onclick="myframe.location.reload();"> </form> </div> <div style="position:relative; clear:both; float:left; width:120px; height:30px; padding:0; margin:0;" > <iframe id="myframe" width="120" height="30" src="http://dell.com" scrolling="no" style="cursor:pointer; border: 1px solid #666666; width:120px; height:30px;"> </div> <div style="float:left; clear:both;">&nbsp;</div> </body> </html>
Component: View Source → General
QA Contact: view.source → general
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.4; en-US; rv:1.9.1a1pre) Gecko/2008061613 Minefield/3.1a1pre I see "Error: myframe is not defined", as I would expect, since your document is in standards mode (due to the doctype) and uses "myframe" directly as a variable name instead of calling getElementById. See bug 256932.
Status: UNCONFIRMED → RESOLVED
Closed: 17 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: