Also, I forgot, I'm declaring .ajaxSetup variables:
$.ajaxSetup({async:false,cache:false});
On Jan 29, 9:39 am, Greg Schoen <[email protected]> wrote:
> I have a feeling that it might have something to do with the previous
> GET request that I'm calling, but this is more or less the functions
> that I'm calling. I removed some of the unneeded code to make it more
> manageable:
>
> var download = {start:'',end:'',time:'',line:'',kbps:'',diff:''};
> var upload = {start:'',end:'',time:'',line:'',kbps:'',diff:''};
>
> now = new Date(); download.start = now.getTime();
> $.get("download.php", {size:128}, function(data) {
> now = new Date();
> download.diff = (now.getTime()-download.start)/1000;
> testdata = data;
> });
>
> now = new Date(); upload.start = now.getTime();
> $.post("upload.php", {file:testdata}, function() {
> now = new Date();
> upload.diff = (now.getTime()-upload.start)/1000;
> $("#results").html("Download Time: "+download.diff+"
> seconds<br>"+"Upload Time: "+upload.diff + " seconds");
> });
>
> On Jan 29, 9:35 am, John Resig <[email protected]> wrote:
>
>
>
> > Hmm - do you have a test case that we can look at? I'd imagine that
> > Opera is triggering some ready state too early, or some such.
>
> > --John
>
> > On Thu, Jan 29, 2009 at 7:16 AM, Greg Schoen <[email protected]> wrote:
>
> > > I'm having an issue with .ajax and .post and their callbacks. I have
> > > the following function:
>
> > > $.post("upload.php", {file:testdata}, function() {
> > > $("#results").html("done!");
> > > });
>
> > > testdata is a 128k string that gets posted to the server, however, in
> > > IE and in Opera, the success/callback is triggered as soon as that the
> > > post is hit, not after it completes. In FF, this works flawlessly,
> > > according to firebug the post takes around 2.2s to complete, and the
> > > success/callback triggers properly once the post is done and not
> > > before.
>
> > > Any ideas? Am I missing something?
>
> > > -Greg
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"jQuery Development" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/jquery-dev?hl=en
-~----------~----~----~----~------~----~------~--~---