Hi everyone.
I'm kind of stuck with a problem an I hope you can give me a hint on
how to solve it.
I have a page with several (varying amount) checkboxes on it (called
memberemail). I have a script looping over all checkboxes, adding the
value (if selected) to a link.
--
link='mailto:';
sel=0;
for( i=0; i<document.form.memberemail.length; i++){
if(document.form.memberemail[i].checked){
link=link+document.form.memberemail[i].value+';';
sel++;
}
}
--
Since I'm using prototype in some other pages, I wanted to migrate
this too. I tried the following which is working with <select> tags
and other <input> tags.
--
link='mailto:';
sel=0;
for( i=0; i<$('memberemail').length; i++){
if($('memberemail')[i].checked){
link=link+$('memberemail')[i].value+';';
sel++;
}
}
--
After trying some other variants I derived from documentation or other
examples, but I can't get it working. Furthermore performance is an
issue here, because there are up to 2k checkboxes in the page.
Hoping you will have a solution for me ;-)
I send greetings from Munich.
Jens
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Spinoffs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---