async: false should be doing the job.

To be sure, your code looks something like that example:

jQuery.ajax({
         url:    'http://example.com/catalog/create/'
                  + targetNode.id
                  + '?name='
                  + encode(to.inp[0].value),
         success: function(result) {
                      if(result.isOk == false)
                          alert(result.message);
                  },
         async:   false
    });

right?

mxAjax / CFAjax docs and other useful articles:
http://www.bifrost.com.au/blog/

2009/9/23 Rick Faircloth <r...@whitestonemedia.com>:
>
> It's $.ajax and post method.
>
> So far, I haven't been able to figure any way to cause the
> $.ajax call to wait for the images to be processed before continuing.
>
> I've look at ajaxComplete, ajaxSuccess, using cfthread in the cfc method,
> breaking the script into two parts, using async:false setting in the $.ajax
> settings...
> nothing seems to have the desired effect.
>
> If there was just some way I could get a variable or something that would
> only be sent once the images completed processing and then somehow to set up
> something to wait for that data to show up, as in a loop within the call
> back or something.
> But I can't think of anything I could use like that.
>
> It seems no matter what I do on the CF backend in the cfc, the ajax call is
> going
> to skip right over the processing and head back to the calling page and I
> can't find a way
> to control the events in the callback.
>
> Rick
>
> -----Original Message-----
> From: lists [mailto:li...@commadelimited.com]
> Sent: Tuesday, September 22, 2009 11:39 PM
> To: cf-talk
> Subject: RE: CF & jQuery - How to delay ajax completion until images are
> processed...
>
>
> Rick...
>
> Are you using the GET/POIST methods, or using the AJAX methods from within
> jQuery?
>
> AJAX is gonna be your best bet as it's got more options.
>
>
> andy
>
> -----Original Message-----
> From: Rick Faircloth [mailto:r...@whitestonemedia.com]
> Sent: Tuesday, September 22, 2009 10:13 PM
> To: cf-talk
> Subject: RE: CF & jQuery - How to delay ajax completion until images are
> processed...
>
>
> Thanks for the tip, James...
>
> I tried to use the setting "async: false" in the ajax parameters, but that
> didn't seem to have any effect.
>
> I wish I could somehow let the image processing continue even if the "close"
> button on the success dialog is clicked.  But that causes the processing to
> stop.
>
> It might work if I weren't re-writing the property list on the screen after
> adding a property, but that defeats the whole purpose of using ajax.
>
> Clients have commented about the length of time it takes for all the image
> processing to occur.  I even tried putting the image processing part of the
> cfc method into a cfthread, but that didn't seem to help, either.
>
> I'll check out your link...perhaps that's the answer.
>
> Rick
>
> -----Original Message-----
> From: James Holmes [mailto:james.hol...@gmail.com]
> Sent: Tuesday, September 22, 2009 11:01 PM
> To: cf-talk
> Subject: Re: CF & jQuery - How to delay ajax completion until images are
> processed...
>
>
> It sounds like you need a synchronous request e.g.:
>
> http://stackoverflow.com/questions/133310/how-can-i-get-jquery-to-perform-a-
> synchronous-rather-than-asynchronous-ajax-req
>
> Of course, if you have to wait for a response, it may be worth simply
> doing a normal post rather than using ajax.
>
> mxAjax / CFAjax docs and other useful articles:
> http://www.bifrost.com.au/blog/
>
>
>
> 2009/9/23 Rick Faircloth <r...@whitestonemedia.com>:
>>
>> Got a combination CF & jQuery question for those of you who use
>> both.usually, I can get
>>
>> a better response from folks who use CF & jQuery than I can from those who
>> use only jQuery.
>>
>>
>>
>> I've got an ajax call (not AJAX call.) that inserts property data into a
>> database then processes from 1 to usually
>>
>> no more than around 10 images, creating multiple sizes, etc.
>>
>>
>>
>> The problem I'm having is that the ajax call, being asynchronous, returns
>> back to the calling
>>
>> page and continues executing instructions before the images are all
>> processed.
>
>
>
>
>
>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:326528
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to