[Webkit-unassigned] [Bug 9508] New: JavaScript Comparing a form element group to itself returns false.
bugzilla-daemon at opendarwin.org
bugzilla-daemon at opendarwin.org
Mon Jun 19 10:33:23 PDT 2006
http://bugzilla.opendarwin.org/show_bug.cgi?id=9508
Summary: JavaScript Comparing a form element group to itself
returns false.
Product: WebKit
Version: 420+ (nightly)
Platform: Macintosh
OS/Version: Mac OS X 10.4
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: JavaScriptCore
AssignedTo: webkit-unassigned at opendarwin.org
ReportedBy: troyb at omnigroup.com
Using this example produces a false result for the button group (theRadio) and
a true return for element zero.
Expected, both should return true which is what happens in Firefox and Opera.
The checked / unchecked state of the buttons is not examined.
<html>
<head>
<script type='text/javascript'>
function compareObjects() {
var alertText;
with (document.theForm) {
alertText = "with (document.theForm) {"
alertText += "\n\t(theRadio == theRadio) == "
if (theRadio == theRadio) {
alertText += "true";
} else {
alertText += "false";
}
alertText += "\n\t(theRadio[0] == theRadio[0]) == "
if (theRadio[0] == theRadio[0]) {
alertText += "true";
} else {
alertText += "false";
}
alertText += "\n}";
}
alert(alertText);
}
</script>
</head>
<body>
<p>Clicking the "Compare" button below calls a JavaScript function that
compares the <i>theRadio</i> radio button group to itself and compares element
zero of the button group to itself, then displays the results of those
comparisons in an alert. The checked/unchecked state of the radio buttons is
not examined.</p>
<form name='theForm'>
<input type='button' name='theButton' value='Compare'
onclick='compareObjects()' />
<p><input type='radio' name='theRadio' value='0' /> theRadio[0]<br />
<input type='radio' name='theRadio' value='1' /> theRadio[1]</p>
</form>
</body>
</html>
--
Configure bugmail: http://bugzilla.opendarwin.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
More information about the webkit-unassigned
mailing list