Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
02-16-2009, 11:42 AM #1
- Join Date
- Feb 2009
- Thanked 0 Times in 0 Posts
How do I get a form element to notify me of its element number within a form???
I can find an element using a loop to check through all the elements within a form but I need a way that an element (eg a checkbox which is one of many of the same name) can notify me of its array position when i click it.
The checkbox is defined within 'myform' as follows in a php loop which builds up the form:
<input type='checkbox' name='addme' id='addme' onClick='addthis()'>
in this way I create a form of club members with a checkbox whcih I intend to use to add/delete members to a mail list.
I can get addthis() to activate with general debug messages but it will not report document.myform.addme.length. Just one of my issues as I dont know how many elements (ie club members in the form) to loop through.
I want to click on any checkbox and use its array position to set another array element with a corresponding value.
Any suggestion gratefully accepted - i am a newbie after all...
02-16-2009, 02:04 PM #2
- Join Date
- Nov 2004
- The land of chocolate
- Thanked 16 Times in 16 Posts
Last edited by snowieken; 02-16-2009 at 02:08 PM.
Susie, if you want to see your doll again, leave $100 in this envelope by the tree out front. Do NOT call the police. You CANNOT trace us. You CANNOT find us.