|
-
Jun 12th, 2001, 09:06 AM
#1
Thread Starter
Frenzied Member
Okay, if I'm not mistaken, all input elements with the same name, will become an array in the DOM.
In other words...
Code:
<html>
<body>
<form name='myForm'>
<input name='myInput'>
<input name='myInput'>
</form>
<script language='JavaScript'>
function myFunc() {
alert document.myForm.myInput[0].value;
alert document.myForm.myInput[1].value;
}
</script>
</body>
</html>
I could be wrong.
Travis, Kung Foo Journeyman
As always, RTFM.
WWW Standards: HTML 4.01, CSS Level 2, ECMA 262 Bindings to DOM Level 1, JavaScript 1.3 Guide and Reference
Perl: Learn Perl, Llama, Camel, Cookbook, Perl Monks, Perl Mongers, O'Reilly's Perl.com, ActiveState, CPAN, TPJ, and use Perl;
YBMS, but Mozilla doesn't.
-
Jun 12th, 2001, 09:16 AM
#2
Addicted Member
You're probably not, since I have successfully used this tactic with radio buttons.
So i guessed i'll try again with this method. I thought I was wrong coz I was gettin' an error as chkNotifier didn't exist... If you see any mistake in my code, don't hesitate to tell me !
Thanks for the input !
-
Jun 12th, 2001, 11:57 AM
#3
Frenzied Member
Lose the parenthesis next to the name. The DOM enumerates them not you.
oOOo--oOOo
__ /\/\onte96
oOOo--oOOo
Senior Programmer/Analyst
MCP
[email protected]
[email protected]
Your results may vary.. some restrictions may apply.. pricing and participation may vary.. not available in all states.. professional driver closed course..quantities limited..
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|