Bonnie Smyre
08-30-2002, 02:52 PM
Are input names allowed to include dashes? I have a
webpage that has some inputs like this:
<input type="text" name="RC-ENR-LIMIT" value="0001">
That works fine until I try to refer to the textbox with
JavaScript like this:
<a onClick="document.frm.RC-ENR-LIMIT.focus();
document.frm.RC-ENR-LIMIT.select();">ERROR</a>
The JavaScript doesn't do anything. If I change the dashes
to underscores, it works.
Please let me know if you have any
ideas.
Thanks!
Bonnie
webpage that has some inputs like this:
<input type="text" name="RC-ENR-LIMIT" value="0001">
That works fine until I try to refer to the textbox with
JavaScript like this:
<a onClick="document.frm.RC-ENR-LIMIT.focus();
document.frm.RC-ENR-LIMIT.select();">ERROR</a>
The JavaScript doesn't do anything. If I change the dashes
to underscores, it works.
Please let me know if you have any
ideas.
Thanks!
Bonnie