[jQuery] Help Needed Passing Checkbox Values to SELECT Element

[jQuery] Help Needed Passing Checkbox Values to SELECT Element


I'm not the world's greatest Jquery coder so I'm hoping someone can
help me with this. I have a client that needs me to pass the VALUES
of certain items checked in one form, to a select box in another
form. I've been successful at doing this between two select elements,
but can't seem to get it to work between checkboxes and a select
element.
Here's the code I have thus far:
$('#saveclose').click(function() {
        return !$('form#runitsform
input[@name="runits"]:checked').appendTo('form#command #roleSelect');
    });
Now (in Firefox only), this does do something -- it send the checkbox
itself to the Select box in the other form. What I need is for the
VALUES of the checked boxes to be sent over instead.
I've been doing some reading up on it and I realize I have to
use .val() somehow but everywhere I've tried it I either get errors or
nothing happens.
Any help would be much appreciated. When this deadline is through,
I'm definitely sitting down to learn Jquery better :-)
Cheers.




















    • Topic Participants

    • drew