473,287 Members | 1,581 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,287 software developers and data experts.

Ajax/Prototype: onComplete fires before response returned in Firefox

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
Feb 14 '07 #1
4 7661
ext237 said the following on 2/14/2007 11:30 AM:
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/
Feb 14 '07 #2

>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.
Feb 14 '07 #3
ext237 said the following on 2/14/2007 5:01 PM:
>>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).
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/
Feb 14 '07 #4

"Randy Webb" <Hi************@aol.comwrote in message
news:Ta********************@telcove.net...
ext237 said the following on 2/14/2007 5:01 PM:
>>>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).
>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.
Feb 14 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: morganwhitney | last post by:
Hi all, I am developing a web app and I am implementing the JavaScript using the Prototype Framework. I have done all the same stuff from scratch in a previous application and it worked fine, but...
5
by: dougwig | last post by:
I'm trying to handle the scenario where a user's session times out and and their ajax request triggers a redirection by the webserver (302 error?). I'm using Prototype 1.4 and the my works great...
4
by: keyofdminor | last post by:
Folks, Short version: Has anyone tried a synchronous call ("SJAX") to a server with the Prototype library? I'm curious if there is a bug in the library (possible) or if I am making mistake...
17
by: Steve-O | last post by:
The following code works great in FireFox, Opera, Netscape, Safari, and Gecko, but NOT IE. Why? I tried using 'native' js with setInterval and setTimeout, but I get the same result. My IE...
4
by: evgenyg | last post by:
Hello ! We have the following situation - when Ajax request is sent what's being returned by the server is usually an XML (which is used for DOM updates) but sometimes it's HTML which is a whole...
2
by: Zeba | last post by:
Hi guys! I'm new to JS / Ajax; I've been trying to do an Ajax call to my Webservice ( I'm using C# for code-behind). I'm not using any of the libraries available. I am sending my CustID to the...
5
gregerly
by: gregerly | last post by:
Ok, I've got an ajaxed calendar that lets users add their own events. This works great in Firefox and IE. In Safari however, i'm getting errors as the response text, instead of the success or...
3
by: SamithaFernando | last post by:
Hi all, can we get a response outside the domain using ajax? Eg. http://www.example.com/webService?list=test . then that may snd xml or json string to us. var url...
1
by: maildmz | last post by:
Goodafternoon, I have got a minimum Mongrel instance running (see ruby code) and i am hitting it with an Ajax request using Prototype. (see javascript code) I get the 'onLoading' event, but...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: marcoviolo | last post by:
Dear all, I would like to implement on my worksheet an vlookup dynamic , that consider a change of pivot excel via win32com, from an external excel (without open it) and save the new file into a...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.