Closed
Bug 75663
Opened 24 years ago
Closed 21 years ago
on assigning wrong strings to align attribute of TR, it even returns same wrong strings if we access the same attribute
Categories
(Core :: DOM: Core & HTML, defect, P5)
Core
DOM: Core & HTML
Tracking
()
VERIFIED
INVALID
Future
People
(Reporter: desale, Unassigned)
References
()
Details
(Keywords: testcase)
on assigning wrong strings to align attribute, it even returns same wrong
strings if we access the same attribute.
Getting little confusing.
Here is an example.
If we assign TR.align = "RigHT" & if we try to access
"document.getElementsByTagName( "TR" )[i].align" then it returns "RigHT".
It should return "Right".
BUILDS:
2001-04-10-04 [Win95]
2001-04-10-04 [Mac]
2001-04-10-14 {Linux]
STEPS TO REPRODUCE:
1] Please visit URL above.
2] Click button "Show me TR align"
EXPECTED RESULTS: alert should show 3 messages like following
document.getElementsByTagName('TR')[0].align = Center
document.getElementsByTagName('TR')[1].align = Left
document.getElementsByTagName('TR')[2].align = Right
ACTUAL RESULTS: alert shows 3 messages like following
document.getElementsByTagName('TR')[0].align = CENTER
document.getElementsByTagName('TR')[1].align = left
document.getElementsByTagName('TR')[2].align = RighT
pasting the testcase code too. same testcase at URL above.
HTML CODE START
<HTML>
<HEAD>
<TITLE></TITLE>
</HEAD>
<BODY>
<TABLE BORDER=1>
<TBODY>
<TR><TD>I had foo for lunch.</TD></TR>
<TR><TD>I blew my foo.</TD></TR>
<TR><TD>There was too much spleem in it.</TD></TR>
<TBODY>
</TABLE>
<script>
<!--
function showalign(){
var setTo = new Array("CENTER","left","RighT");
var shouldBe = new Array("Center","Left","Right");
for (i = 0; i<3; i++){
var t=document.getElementsByTagName( "TR" )[i].align;
t=setTo[i];
alert("document.getElementsByTagName('TR')[" + [i] + "].align ="
+ t);
};
}
//-->
</script>
<FORM NAME="secondform">
EXPECTED RESULTS:
alert should show 3 messages like following<br>
document.getElementsByTagName('TR')[0].align = Center<br>
document.getElementsByTagName('TR')[1].align = Left<br>
document.getElementsByTagName('TR')[2].align = Right<br><br>
ACTUAL RESULTS:
alert shows 3 messages like following<br>
document.getElementsByTagName('TR')[0].align = CENTER<br>
document.getElementsByTagName('TR')[1].align = left<br>
document.getElementsByTagName('TR')[2].align = RighT<br><br>
<INPUT TYPE="button" NAME="but1" VALUE="Show me TR align"
onclick="showalign();">
</FORM>
</BODY>
</HTML>
HTML CODE END
| Reporter | ||
Comment 1•24 years ago
|
||
Changing Componenet. I guess this is DOM-HTML.
Component: HTMLTables → DOM HTML
| Reporter | ||
Comment 2•24 years ago
|
||
Changing component
Assignee: karnaze → jst
QA Contact: amar → desale
| Reporter | ||
Comment 3•24 years ago
|
||
Same thing happens if we try to do with "valign" too.
Like "TOP", "middle", "BottoM".
| Reporter | ||
Comment 5•24 years ago
|
||
Updating QA contact to Shivakiran Tummala.
QA Contact: desale → stummala
Comment 8•21 years ago
|
||
In my opinion this is invalid. Those attribute values don't map to a useful
possible value, so we just store them as strings. That's what we should be
doing....
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → INVALID
Erm, this looks invalid, but for entierly different reasons. It doesn't look
like the code is actually setting and reading the attribute. It rather just sets
a local variable and prints it out.
Or am I missing some fundamental part of JS here?
Comment 10•21 years ago
|
||
It's setting a property in the W3C DOM that's mapped to an attribute...
is it? AFAICT it sets the local variable 't'.
t=setTo[i];
alert("document.getElementsByTagName('TR')[" + [i] + "].align =" + t);
Comment 12•21 years ago
|
||
Oh. Um. Yeah. ;)
I love Netscape QA.
Status: RESOLVED → VERIFIED
Component: DOM: HTML → DOM: Core & HTML
QA Contact: stummala → general
You need to log in
before you can comment on or make changes to this bug.
Description
•