Not too long ago I started using jquery, it's working faily well but
I'm not exactly an expert yet to say the least.
At the moment I'm trying to create a way to select multiple options
from a large list. I did this in the following way here:
http://web-develop.nl/tests/jquery/
However I decided something wasn't quite right. First of all, even
though it works when javascript is turned off (yes the values are
different for the checkboxes but if I automate this with php they will
be the same) you still would have to check wich one is used in php.
Second, when you send the form only the selected from the second box
(which most of the time is one) gets send even though you have got
more in the select box.
My idea was to have the checkboxes and hide them if javascript is
turned on and show one selectbox in which the selectable options. The
following should happen:
-> select one or more options
-> click the button
-> the users get removed from the select box and are appended to a
list
-> the corresponding checkbox is checked
This part I got working, however what I can't get working is the
reverse: after creating the list-element (and a remove button/link
next to it) being able to delete the list item and put it back in the
selectbox.
This is what I've got:
http://web-develop.nl/tests/jquery/index2.html
I've left the checkbox visible to show that selecting the checkboxes
works
Anybody that can help me?
No comments:
Post a Comment