Closed Bug 306204 Opened 19 years ago Closed 19 years ago

background scripting property on TD tag is undefined always

Categories

(Firefox :: General, defect)

x86
Windows Server 2003
defect
Not set
major

Tracking

()

RESOLVED DUPLICATE of bug 195261

People

(Reporter: beebop, Unassigned)

Details

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6

set <TD BACKGROUND="someimage.jpg" OnClick="alert(this.background)"> in html
and recive undefined content! In IE6.0 all ok.
Tryed 
code to reproduce (replace BACKGROUND="image.jpg" to valid any image location):

<html>
<head>
<title>BUG!!! FireFox 1.0.6</title>
</HEAD>
<BODY text="#333333" leftmargin="0" topmargin="10" MARGINWIDTH="0"
MARGINHEIGHT="0" BGCOLOR="#FFFFFF">
<center>
		<table width="550" height="530" cellspacing="0" cellpadding="0" border="1">
			<tr>
				<td width="550" height="530" valign="top" BACKGROUND="image.jpg"
align="center" style="background-position:center
center;background-repeat:no-repeat;" OnClick="alert('By
this.background='+this.background);Next(this);" id='pp'>ClickME!!</td>
			</tr>
		</table>
</center>
<script>
function Next(from) {
var ob=document.getElementById('pp');
alert("by id.background="+ob.background);
alert("by &this.background"+from.background);
}
</script>
</body>
</html>


Reproducible: Always

Steps to Reproduce:
1.<TD BACKGROUND="image.jpg" OnClick="alert(this.background)">
2.click!
3.and get!

Actual Results:  
undefined property

Expected Results:  
TEXT"image.jpg"

Standart Build 1.0.6
about:buildconfig

Build platform
target
i586-pc-msvc

Build tools
Compiler 	Version 	Compiler flags
$(CYGWIN_WRAPPER) cl 	12.00.8804 	-TC -nologo -W3 -nologo -Gy -Fd$(PDBFILE)
$(CYGWIN_WRAPPER) cl 	12.00.8804 	-TP -nologo -W3 -nologo -Gy -Fd$(PDBFILE)

Configure arguments
--disable-ldap --disable-mailnews
--enable-extensions=cookie,xml-rpc,xmlextras,pref,transformiix,universalchardet,webservices,inspector,gnomevfs,negotiateauth
--enable-crypto --disable-composer --enable-single-profile
--disable-profilesharing --enable-optimize --disable-debug --disable-tests
--enable-static --disable-shared --enable-official-branding
The background attribute of td's isn't part of the html4.01 spec, see:
http://www.w3.org/TR/html401/struct/tables.html#h-11.2.6
That means you cannot access it like a dom propery, you need to use
getAttribute('background')

*** This bug has been marked as a duplicate of 195261 ***
Status: UNCONFIRMED → RESOLVED
Closed: 19 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.