I am migrating to jQuery and found this wonderfull tutorial on their webpage.
A must read for anyone which pretend to know js.
http://docs.jquery.com/Types
I am migrating to jQuery and found this wonderfull tutorial on their webpage.
A must read for anyone which pretend to know js.
http://docs.jquery.com/Types
Wow. What a nice idea.
http://code.google.com/p/quipt/
Note: if you want to make the test.html to work checkout and test on http://… it is some beta but it works great only in Firefox
I have a case where the user must select items from a basket and use them with different forms.
It would be easy if the form could be one – less support.
I am starting with those two forms
Here is how it looks the helper form. All the checkboxes are tagged with the class=”selectable”. Here is rails example but you can implement it pure html.
<%= check_box_tag('selected[]', true, image.selected?, :class=>"selectable") %>
Then we can select all the checkboxes with this javascript.
var make_to_hidden = $$('input.selectable');
Put on your action form an id so we can access it easy in this case:
Lets add those checkboxes from the first form to the real action form with this javascript function
function import_selected_basket() { var make_to_hidden = $$('input.selectable'); make_to_hidden.each(function(item) { if (item.checked) { var new_item = new Element('input', { 'type': 'hidden', name: item.name, value: item.value }) $('mail_form').appendChild(new_item) } });
© 2024 Gudasoft
Theme by Anders Norén — Up ↑