Closed Bug 11833 Opened 27 years ago Closed 27 years ago

bgcolor on a table can't be read from DOM unless it's set in DOM

Categories

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

defect

Tracking

()

VERIFIED INVALID

People

(Reporter: jcarpenter0524, Assigned: vidur)

Details

Attachments

(1 file)

Overview Description: bgcolor on a table can't be read from DOM unless it's set in DOM AND bgcolor set in DOM doesn't affect table. Steps to Reproduce: - set the bgcolor attribute for a table in DOM - run your code and see that the table bgcolor is unaffected yet a document.write statement will show you that the color has been set - start over and set the bgcolor of the table from within the table tag: <TABLE BGCOLOR="RED"> - now use the document.write statement and see that the bgcolor attribute is interpreted as "undefined" - View attached file or see code below Actual Results: When bgcolor is set in the table, document.write reads "undefined" When bgcolor is set through DOM, document.write reads the correct color, but the table is not affected. Expected Results: document.write should read the color the table was set to, and when set through DOM the table should change to the new color selection Build Date & Platform Bug Found: Win98, WinNT, MacPPC, Linux 1999-08-12-10-M9 CODE: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD><TITLE>test</TITLE></HEAD> <BODY> <TABLE bgcolor="aqua"> <TR> <TD>cell 1 <TD>cell 2 <TD>cell 3 </TABLE> <SCRIPT TYPE="text/javascript"> var oList=document.firstChild.childNodes[1].childNodes[1]; document.write("Color set in table: " + oList.bgcolor); oList.bgcolor="pink"; document.write(" Color set in DOM: " +oList.bgcolor); </SCRIPT> </BODY></HTML>
QA Contact: gerardok → janc
Status: NEW → RESOLVED
Closed: 27 years ago
Resolution: --- → INVALID
That should be "bgColor". JavaScript is case-sensitive.
Status: RESOLVED → VERIFIED
verified invalid
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: