Closed Bug 176248 Opened 23 years ago Closed 13 years ago

bgColor does not change background color

Categories

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

x86
Windows 2000
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: vmehta1, Unassigned)

References

()

Details

bgColor properties when try to change color of child window just invoked through open method fails to change backgroud color. You can view the script and test the bug at http://web.njit.edu/~vsm3/bgColorBug.html. This only happens in Netscape 7, while works fine with IE 5.5 and Netscape 4.x browsers. Seems to be a bug. Here is the script of bgColor.html : <html> <script language=JavaScript> var wx; function newWin() { wx=window.open ("testPage.html","VHELP","resizable,height=400,width=450,resizable=yes,scrollbar s=yes"); //wx.document.bgColor="#ff0000"; //wx.onLoad = self.paintWin; //wx.document.body.onLoad = self.paintWin; wx.onLoad = new Function("wx.document.bgColor=\"#ff0000\";"); wx.document.bgColor="#ff0000"; } function paintWin() { wx.document.bgColor="#ff0000"; alert(wx.document.bgColor); } </script> <body> <form> <input type=button value="Click Me to TestBug" onClick=newWin();> <P> Works on Netscape 4.x and IE but does not work in Netscape 7.0. New Window should open with background color Red, but does not seem to be happending in Netscape 7.0.</p> <BR> </form> </body> </html> And here is the script of testPage : <HTML> <HEAD> </HEAD> <BODY> Here is the new window. </BODY> </HTML>
Browser, not engine ---> DOM Level 0 Confirming bug with Mozilla trunk binary 20021015xx on WinNT. I saved both HTML files given above. When I clicked the test button in the parent page, the child window came up, turned briefly red, and then turned white. In IE6, the child window comes up red and stays red.
Assignee: rogerl → jst
Status: UNCONFIRMED → NEW
Component: JavaScript Engine → DOM Level 0
Ever confirmed: true
QA Contact: pschwartau → desale
The testcase sets the color at two places. >wx.onLoad = new Function("wx.document.bgColor=\"#ff0000\";"); This will not work because of bug 134335. (The onload handler will never execute I think.) >wx.document.bgColor="#ff0000"; Looks like this works but gets overwritten at some stage as the markup actually loads (thus the flash of red?)
Mass-reassigning bugs to dom_bugs@netscape.com
Assignee: jst → dom_bugs
Summary: bgColor for Netscape 7 does not change background color in Netscape 7 → bgColor does not change background color
Assignee: general → nobody
QA Contact: desale → general
Works fine if you spell "onload" correctly...
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.