document.getElementById("").width called repeatedly with setTimeout() causes loss of padding info on table.

RESOLVED WORKSFORME

Status

()

Core
DOM: Core & HTML
P3
minor
RESOLVED WORKSFORME
18 years ago
10 years ago

People

(Reporter: Craig Kohtz, Assigned: karnaze (gone))

Tracking

({dom2})

Trunk
x86
Windows NT
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

(Reporter)

Description

18 years ago
In the URL above, this is what happens...

I create a table with a width of 100%. Using onload, I call a function that 
changes the width to 200. At the end of this function, it calls itself again. 
The first time the function is called (using onload), it changes the size of 
the table correctly. The second time the function is called (using setTimeout 
at the end of the function), the table looses all of its cellpadding and 
cellspacing information.

This is a simplified version of my function. The origional function checks the 
document.body.offsetWidth. If the size is greater than 800, I set the size to 
800. If the document.body.offsetWidth is smaller than 800, I set the size to 
100%. I did this so the page expand and contract with the browser size, but 
will only reach a width of 800 max, when the browser size is larger.
Looks like a table reflow problem, reassigning to karnaze.
Assignee: jst → karnaze

Comment 2

18 years ago
Confirming the bug with 2000081608
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: dom2
Component: DOM Level 2 → DOM HTML

Comment 3

17 years ago
Here's what I see: 
When the page loads the table takes up the full width of the window, with 4
rows, and the "more" entirely on the right of the table.
After two or three seconds, the table's width is set to something smaller (about
200px), but the layout is exactly the same as the full width table. The "more"
is on the bottom right of the table (that is, 200px from the border of the
window), and the rest looks exactly like the full-width table.
Reporter or Bernd, could you please tell me what are the expected results?

Comment 4

17 years ago
WFM win98 cvs 2001-05-18

Comment 5

17 years ago
WFM too, using 2001063008 Win2k. Marking so.

Craig, feel free to reopen this bug if this still is a problem.
Status: NEW → RESOLVED
Last Resolved: 17 years ago
Resolution: --- → WORKSFORME

Updated

10 years ago
Component: DOM: HTML → DOM: Core & HTML
QA Contact: vidur → general
You need to log in before you can comment on or make changes to this bug.