posted 17 years ago
There are two selects in a form called Form1, respectively called firstSelect and secondSelect.
The firstSelect has an onchange event defined like this:
<select name="firstSelect" onchange="changVal(this, document.myform.secondSelect)">
When the value changes, changVal(oElem,oTarget) is called.
In changVal(), calling alert(oTarget.form.name) will display the form name Form1.
Can you please explain this ? I can't see anything about Select components having a property called form in the HTML Specification. Maybe I'm looking at the wrong spec.
(For those who own Ajax In Action, please refer to Listing 9.2, page 333)