Ok, so I explained what I'm trying to do below, in part.  I also have this
function:

statusChange = function(scope){
    $('.invited, .accepted, .declined',
scope).css('cursor','pointer').click(function(){
        var url = 
'ajaxunited.lasso?task=event&method=invitation&volunteer=';
        url += $(this).attr('id');
        url += '&status=' + $(this).attr('class');
        console.log (url);
        $('#invitation').jqm({ajax: url}).jqmShow();
    });
    }

The problem I'm having is that the modal isn't using the new url after the
status is changed the first time.  I have included the firebug output:

//////// Console log of URL variable
ajaxunited.lasso?task=event&method=invitation&volunteer=9e4bc236c3ab21e2&sta
tus=declined

/////// Firebug GET displays calling this URL variable
GET 
http://urpdev.llnl.gov/admin/ajaxunited.lasso?task=event&method=invitation&v
olunteer=9e4bc236c3ab21e2&status=declined (131ms)

////// Firebug POST shows the action occuring within the modal
POST http://urpdev.llnl.gov/admin/ajaxunited.lasso

//////// Console log of URL variable after statusChange has been called
again to reflect changes by modal (see the status is now accepted)
ajaxunited.lasso?task=event&method=invitation&volunteer=4cd0f4bd3a8fc7a9&sta
tus=accepted

/////// Firebug GET displays calling the first URL variable
GET 
http://urpdev.llnl.gov/admin/ajaxunited.lasso?task=event&method=invitation&v
olunteer=9e4bc236c3ab21e2&status=declined (135ms)


SO, jqModal isn't reflecting the new URL.  How can I make sure this is
cleared after the first time to make sure it gets the right one  the second
(third, fourth, etc) time?

On 5/15/07 9:45 AM, "Shelane" <[EMAIL PROTECTED]> wrote:

> 
> 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