Connecting Tech Pros Worldwide Forums | Help | Site Map

Ajax/Prototype: onComplete fires before response returned in Firefox

ext237
Guest
 
Posts: n/a
#1: Feb 14 '07
Simple ajax call seems to have some issues in Firefox. The "onComplete:" is
called BEFORE the response is returned by the call. Is there a coding issue
or a work around?

var ajax = new Ajax.Request( url, {method: 'post', parameters: params,
onComplete: evalInfo });

function evalInfo( request )
{
// do stuff with request
}

Should I have a timer that checks the request state before exec the
evalInfo?

Thanks



Randy Webb
Guest
 
Posts: n/a
#2: Feb 14 '07

re: Ajax/Prototype: onComplete fires before response returned in Firefox


ext237 said the following on 2/14/2007 11:30 AM:
Quote:
Simple ajax call seems to have some issues in Firefox.
No, the issue is with the Prototype.js library. "AJAX" calls are just
fine in Firefox.

Try the Ruby On Rails group for Prototype.js help.

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
ext237
Guest
 
Posts: n/a
#3: Feb 14 '07

re: Ajax/Prototype: onComplete fires before response returned in Firefox



Quote:
Quote:
>Simple ajax call seems to have some issues in Firefox.
>
No, the issue is with the Prototype.js library. "AJAX" calls are just fine
in Firefox.
You are absolutly right, Ajax works fine in Firefox. Perhaps I should have
said this instead:

The *following* simple ajax call using prototype.js seems to have issues in
Firefox. Does anyone else experience this issue where the "onComplete"
executes before the ajax call is complete?

var ajax = new Ajax.Request( url, {method: 'post', parameters: params,
onComplete: evalInfo });

function evalInfo( request ) {// do stuff with request}

Thanks for any help.


Randy Webb
Guest
 
Posts: n/a
#4: Feb 14 '07

re: Ajax/Prototype: onComplete fires before response returned in Firefox


ext237 said the following on 2/14/2007 5:01 PM:
Quote:
Quote:
Quote:
>>Simple ajax call seems to have some issues in Firefox.
>No, the issue is with the Prototype.js library. "AJAX" calls are just fine
>in Firefox.
>
You are absolutly right, Ajax works fine in Firefox. Perhaps I should have
said this instead:
>
The *following* simple ajax call using prototype.js seems to have issues in
Firefox. Does anyone else experience this issue where the "onComplete"
executes before the ajax call is complete?
I don't. But then again, I don't use prototype.js (I prefer something
more cross-browser).
Quote:
Thanks for any help.
Did you try the suggestion I made in my previous reply with regards to
the Ruby spin off group?
--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
ext237
Guest
 
Posts: n/a
#5: Feb 14 '07

re: Ajax/Prototype: onComplete fires before response returned in Firefox



"Randy Webb" <HikksNotAtHome@aol.comwrote in message
news:TaKdnbXzsfPTDE7Y4p2dnA@telcove.net...
Quote:
ext237 said the following on 2/14/2007 5:01 PM:
Quote:
Quote:
>>>Simple ajax call seems to have some issues in Firefox.
>>No, the issue is with the Prototype.js library. "AJAX" calls are just
>>fine in Firefox.
>>
>You are absolutly right, Ajax works fine in Firefox. Perhaps I should
>have said this instead:
>>
>The *following* simple ajax call using prototype.js seems to have issues
>in Firefox. Does anyone else experience this issue where the
>"onComplete" executes before the ajax call is complete?
>
I don't. But then again, I don't use prototype.js (I prefer something more
cross-browser).
>
Quote:
>Thanks for any help.
>
Did you try the suggestion I made in my previous reply with regards to the
Ruby spin off group?
--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices -
http://www.JavascriptToolbox.com/bestpractices/
If you mean comp.lang.ruby, yes, I posted there. So far, no replies, but
I'll check back.

Thanks.


Closed Thread