|
-
Oct 23rd, 2002, 06:15 AM
#1
Thread Starter
Addicted Member
Javascript and HTML hidden fields
OK, I have some hidden fields in my HTML document:
<input type="hidden" name="myField" value="1"/>
<input type="hidden" name="myField" value="2"/>
<input type="hidden" name="myField" value="3"/>
As you can see, they all have the same name, but different values. I am using servlets and JSP which allow you to use the request.getParameterValues("myField") methods, which return an array of strings.
However, I want to access these from a javascript function. So how do I do this? I've tried:
for(int i = 0; i < TheForm.myField.length; i++) document.write(TheForm.myField[i].value);
but this doesn't work.
Any ideas would be greatly appreciated.
HD
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
|