I have a page with a list of volunteers for an event.  Their "status"
is displayed as to whether the have not received an invitation
(class="invite"), they received an invitation and haven't responded
(class="unknown"), they accepted the invitation (class="accepted"),
they declined the invitation (class="declined").  These are displayed
as images with the volunteer's ID as the id of the image.  I have
successfully attached a click event to send the invitation when none
has been sent (class="invite"), (no modal).

I want to attach a modal to each of the other classes to allow the
administrator to manual set the status.  So it would pull up a dialog
of choices.  To the URL, it must pass in the ID of the volunteer in id
of the image, and a couple of other "known" parameters.  Then the
modal may or may not read the "invitation message" on the main page
(if resending the invitation).  Clicking on one of the three options
needs to send the results back to the server.

So, I've read through the documentation and I'm a little lost of what
I need to do.

I want to assign the modal dialog
<div id="invitation" class="jqmWindow"><img src="/admin/images/
purplegirlkickball.gif" width="90" height="90" /></div>

To all images with a class of unknown.
$(function(){
$('.invited').css('cursor','pointer').click(function(){
    var url = 'myserverpage.lasso?task=event&event=1&volunteer=';
    url += $(this).attr('id');
        $('#invitation').jqm({ajax: url, trigger: $(this)});
    });
});

Am I going about this the right way?  Any gotchas I should know about
with this approach.

Thanks
(this is my first attempt as using any modal)

Reply via email to