problem with content generated by javascript and after accessing it by getElementById function

RESOLVED FIXED

Status

()

Core
DOM: Core & HTML
RESOLVED FIXED
16 years ago
16 years ago

People

(Reporter: Bruno Arliguy, Assigned: jst)

Tracking

Other Branch
x86
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(3 attachments)

(Reporter)

Description

16 years ago
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2) Gecko/20021126
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2) Gecko/20021126

In an html page, there is a script that generate content with the javascript
function document.write. This content is a DIV with id 'square' and class 'red'
which define a red border.
First problem, this DIV have no class. it's present in the DOM tree (i can view
it with the dom inspector), but with no attribute (no class, no id, ...).
So after it's not possible to acces it with a document.getElementById("square").

This script was working on Mozilla 1.2b

Reproducible: Always

Steps to Reproduce:
1.try the script with 1.2 and 1.2b :)

Actual Results:  
with 1.2 div 'square' have not border
with 1.2b div 'square' has his border

Expected Results:  
red border in any version :)
(Reporter)

Comment 1

16 years ago
Created attachment 107608 [details]
html page for test this problem
(Reporter)

Updated

16 years ago
Summary: problem with content generate by javascript and after accessing it by getElementById function → problem with content generated by javascript and after accessing it by getElementById function
WFM in a recent build.
(Assignee)

Comment 3

16 years ago
Is this specific to document.write() or does the same thing happen if you insert
the div in the markup w/o doing the document.write()?
wfm, linux build 2002-11-25-12 trunk
(Reporter)

Comment 5

16 years ago
I try on my home computer, same problem with the "x86 tar.gz format" from the
"Mozilla 1.2 - Released November 26, 2002".

problem seems to be only with the document.write(). If I create the DIV in plain
html, there is no pbm.

Comment 6

16 years ago
yes 1.2 exhibits this bug, but AFAIK 1.2 release is terminal (1.2 branch is no
longer being developed)

worksforme with linux trunk build 20021126 and 1.0 branch build 20021127
(Assignee)

Comment 7

16 years ago
Yup, 1.2 is out the door, and this works on the trunk. Marking WORKSFORME.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 16 years ago
Resolution: --- → WORKSFORME
(Reporter)

Comment 8

16 years ago
Created attachment 107691 [details]
working on IE

square with border (it's what i expect to see)
(Reporter)

Comment 9

16 years ago
Created attachment 107692 [details]
not working on Mozilla 1.2 20021126 with windows

After Linux, I tried on Windows... Same problem : the DIV square has no border.


I don't understand... perhaps Mozilla don't like french computers :))
(Reporter)

Comment 10

16 years ago
Even on windows i can reproduct the problem...

look the 2 screenshots i add in attachment :
 - first is with IE on the attachment "html page for test this problem". And div
"square" has an border
 - second is on Mozilla 1.2 for windows i just installed from mozilla.org. And
the div "square" has no border.

So i don't understand why it's not working for me on 3 different computers and
WFM for everybody else :(
Status: RESOLVED → UNCONFIRMED
Resolution: WORKSFORME → ---

Comment 11

16 years ago
we all agree that it doesn't work with 1.2, but the bug does not exist in the
current trunk, which is newer code than that in 1.2.

http://download.mozilla.org/pub/mozilla/nightly/latest-trunk/

please only reopen this if you can reproduce this with a current trunk build
Status: UNCONFIRMED → RESOLVED
Last Resolved: 16 years ago16 years ago
Resolution: --- → WORKSFORME
Depends on: 182500
Version: Trunk → Other Branch
Reopening, since this was a valid bug on the 1.2 branch.
Status: RESOLVED → UNCONFIRMED
Resolution: WORKSFORME → ---
I have tested that this bug was an instance of bug 182500 / bug 182253 based on
comparison of two Linux builds compiled with gcc 3.2.  This bug was present in
the 1.2 release and was the only bug fixed in the 1.2.1 release (and the reason
for the 1.2.1 release).

Marking this bug as fixed since it should be fixed in the 1.2.1 release.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 16 years ago16 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.