Hi, I need to get the text from the selected checkboxes in a form. Ifhe form is:
<form action="save" method="post" name="reunform" id="reunform" >
<div id="listad">
<ul id="litemsd">
<li class="litemd"><input type="checkbox" name="d1" />Number One</li>
<li class="litemd"><input type="checkbox" name="d2" />Numer Two</li>
<li class="litemd"><input type="checkbox" name="d3" />Numer Three</li>
</ul>
</div>
...
</form>
Using Prototype: How can I get the string "Number One\nNumberThree" should these be selected ?
To test something I tried:
$$('li.litemd').pluck('checked').each(function(s) {
alert(s.innerHtml)
});
But I'm getting "s is undefined" in firebug.
Thanks