J
Java script Dude
We just discovered another IE bug.
When an html form contains an element with a name of `name` IE's
internal index screws up the .name property of the containing form to
point to the bad element object instead of containing the string name
property of the form.
Here is the simplified test case:
<html>
<head>
<title>IE Name="name" Bug</title>
<script>
function showFormName(){
alert(
"Text should say `fmTest`~~~> "+
oF["good_name"].form.name+"\n\n"+
"Second test: Test .value prop~~> "+
oF["good_name"].form.name.value
)
}
</script>
</head>
<body>
<form name="fmTest">
<script>oF=document.forms["fmTest"]</script>
Good:
<input type=text name="good_name" value="Good Elem Name">
<script>showFormName()</script>
Bad:
<input type=text name="name" value="Bad Elem Name">
<script>showFormName()</script>
</form>
</body>
</html>
Probably not a good idea to use just `name` anyway `tbName` or similar
is better coding practice any how. We are customizing a system that
uses form element names that match attribute names in our business
object server. `name` is actually the core business object `name`
attribute. We are working around by customizing the TCL core code to
look for obj_name instead.
JsD
When an html form contains an element with a name of `name` IE's
internal index screws up the .name property of the containing form to
point to the bad element object instead of containing the string name
property of the form.
Here is the simplified test case:
<html>
<head>
<title>IE Name="name" Bug</title>
<script>
function showFormName(){
alert(
"Text should say `fmTest`~~~> "+
oF["good_name"].form.name+"\n\n"+
"Second test: Test .value prop~~> "+
oF["good_name"].form.name.value
)
}
</script>
</head>
<body>
<form name="fmTest">
<script>oF=document.forms["fmTest"]</script>
Good:
<input type=text name="good_name" value="Good Elem Name">
<script>showFormName()</script>
Bad:
<input type=text name="name" value="Bad Elem Name">
<script>showFormName()</script>
</form>
</body>
</html>
Probably not a good idea to use just `name` anyway `tbName` or similar
is better coding practice any how. We are customizing a system that
uses form element names that match attribute names in our business
object server. `name` is actually the core business object `name`
attribute. We are working around by customizing the TCL core code to
look for obj_name instead.
JsD