[jQuery] Re: Progress image swap

2008-01-09 Thread Trans
FYI, I figured out a solution. The trick was to use setTimeout() to run the loading code as a separated process. $("#meter").attr("src","img/meter_on.gif").show('fast'); setTimeout("load_stuff_with_ajax",100); Thanks for youall's attempt to help. I appreciate your efforts. T.

[jQuery] Re: Progress image swap

2008-01-08 Thread Trans
On Jan 8, 5:36 pm, "Benjamin Sterling" <[EMAIL PROTECTED]> wrote: > Trans: async: false means that the browser will lock up each request will > not do it asynchronously, which means the code we provide will not work. Is > there a reason you are doing it with async: false? Ah, so it's not refre

[jQuery] Re: Progress image swap

2008-01-08 Thread Benjamin Sterling
Trans: async: false means that the browser will lock up each request will not do it asynchronously, which means the code we provide will not work. Is there a reason you are doing it with async: false? On 1/8/08, Trans <[EMAIL PROTECTED]> wrote: > > > > > On Jan 8, 5:23 pm, "Josh Nathanson" <[EMAI

[jQuery] Re: Progress image swap

2008-01-08 Thread Trans
On Jan 8, 5:23 pm, "Josh Nathanson" <[EMAIL PROTECTED]> wrote: > Any chance you can post a test page somewhere? It's a little hard to > picture what's going on. Here's a strip down rendition of exactly what I'm doing: function Mica() { this.tally = 18; this.types = ['htm', 'txt', 'x

[jQuery] Re: Progress image swap

2008-01-08 Thread Josh Nathanson
Any chance you can post a test page somewhere? It's a little hard to picture what's going on. -- Josh - Original Message - From: "Trans" <[EMAIL PROTECTED]> To: "jQuery (English)" Sent: Tuesday, January 08, 2008 2:13 PM Subject: [jQuery] Re: P

[jQuery] Re: Progress image swap

2008-01-08 Thread Trans
On Jan 8, 4:46 pm, "Benjamin Sterling" <[EMAIL PROTECTED]> wrote: > This is untested but something like: > > var ajaxCalles = 16; > $("#meter").attr("src","img/meter_on.gif") // change the src tag to the > animate gif > $.ajax({ > url: 'myurl', > success : function(){//do processing}, > error:

[jQuery] Re: Progress image swap

2008-01-08 Thread Benjamin Sterling
This is untested but something like: var ajaxCalles = 16; $("#meter").attr("src","img/meter_on.gif") // change the src tag to the animate gif $.ajax({ url: 'myurl', success : function(){//do processing}, error: function(){/process error}, complete : function(){ ajaxCalles--; if(ajaxCalles == 0){

[jQuery] Re: Progress image swap

2008-01-08 Thread Trans
On Jan 8, 4:34 pm, "Benjamin Sterling" <[EMAIL PROTECTED]> wrote: > T, > Keep you head up, we have all felt that way. Thanks Benjamin and Josh. I'm frustrated but I'm determined too! :-) What you both suggest makes sense enough, but I don't just have a single file to pull down. I'm loading 16

[jQuery] Re: Progress image swap

2008-01-08 Thread Andy Matthews
Also, consider that your image might be taking a while to load. Consider preloading the image. _ From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Benjamin Sterling Sent: Tuesday, January 08, 2008 3:34 PM To: jquery-en@googlegroups.com Subject: [jQuery] Re: Progress

[jQuery] Re: Progress image swap

2008-01-08 Thread Benjamin Sterling
T, Keep you head up, we have all felt that way. What I normally do is something like: $("#meter").attr("src","img/meter_on.gif") // change the src tag to the animate gif $.ajax({ url: 'myurl', success : function(){//do processing}, error: function(){/process error}, complete : function(){$("#me

[jQuery] Re: Progress image swap

2008-01-08 Thread Josh Nathanson
You will want to put the line where you show the meter_off image, in the success callback from the ajax request. This will ensure the proper order of execution. Pseudo code: var myAjaxCall = function() { $.ajax({ success: function() { $("#meter").attr("src","img/meter_off.gif"