Closed Bug 48938 Opened 24 years ago Closed 23 years ago

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

Categories

(Core :: DOM: Core & HTML, defect, P3)

x86
Windows NT
defect

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: craig, Assigned: karnaze)

References

()

Details

(Keywords: dom2)

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
Confirming the bug with 2000081608
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: dom2
Component: DOM Level 2 → DOM HTML
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?
WFM win98 cvs 2001-05-18
WFM too, using 2001063008 Win2k. Marking so.

Craig, feel free to reopen this bug if this still is a problem.
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → WORKSFORME
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.