Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > Help with status bar - still showing load in progress even after page load

Reply
Thread Tools

Help with status bar - still showing load in progress even after page load

 
 
Mike Dee
Guest
Posts: n/a
 
      02-20-2006
Hi,

I'm having an issue with the status bar in Mozilla and Netscape showing that
it is still waiting on the page to load even after it is finished. This
problem does NOT occur with IE.

In summary, I am using a onLoad event in the BODY tag to communicate back to
another server each time a page finishes loading. I do this by using a "new
Image()" and setting the .src property to the server. The .src includes a
value in the querystring so I know what request it was that finished
loading.

The challenge here is that the status bar still shows "Transferring data
from www.mysite.com..." despite the image being loaded. It never clears and
leaves the user with the impression that there was a problem loading the
page. My web server logs at the mysite.com show that the browser does
indeed make a request for the image and I get the querystring just fine and
it returns a status of 200 so the image is being found and served ok.

I've tried everything I can think of to solve this and really could use your
help please. Bottom line is that if you use the "new Image" statment from
within the OnLoad event of the Body tag, Netscape and Mozilla never seem to
update the status bar to show "Done" despite it succesfully loading the
image.

Here is a simply snippet you can use to easily reproduce this issue:

CASE A:

<html>
<body onLoad="var img = new Image(1, 1); img.src =
'http://www.mysite.com/img.gif';" >
</html>

Case A results in a status bar that indefinately shows "Transfering data
from www.mysite.com..."

Now interestingly if you change the .src so that its a relative URL instead
of absolute the problem goes away, like this:

CASE B:
<html>
<body onLoad="var img = new Image(1, 1); img.src = '/img.gif';" >
</html>

With this Case B the status bar says Done as expected and all works great.

The challenge here is that the web server that the page is running from and
the web server that I need to make the new Image .src request go to are two
different servers. So I must use the absolute URL.

I wanted to pass this additional information along however because it may
spur some ideas as to what is going on and how I can correct it.

I've tried a variety of things such as trying to clear the status bar by
forcing a window.status="" after the .src property is set, but that doesn't
help. I also tried other things such as using setTimeout to delay the .src
property being set to x milliseconds after the Body OnLoad event fires, but
in this case the same thing happens to the status bar (except that the
"Transferring data from..." message just shows up x milliseconds later.

Interestingly Firefox does not suffer from this behavior, nor does IE. It
seems specific to Mozilla and Netscape, trying the latest version of each.

Any help, tips or suggestions would be GREATLY appreciated!! Thanks so much
in advance.

--- Mike


 
Reply With Quote
 
 
 
 
Randy Webb
Guest
Posts: n/a
 
      02-20-2006
Mike Dee said the following on 2/20/2006 11:09 AM:
> Hi,
>
> I'm having an issue with the status bar in Mozilla and Netscape showing that
> it is still waiting on the page to load even after it is finished. This
> problem does NOT occur with IE.
>
> In summary, I am using a onLoad event in the BODY tag to communicate back to
> another server each time a page finishes loading. I do this by using a "new
> Image()" and setting the .src property to the server. The .src includes a
> value in the querystring so I know what request it was that finished
> loading.
>
> The challenge here is that the status bar still shows "Transferring data
> from www.mysite.com..." despite the image being loaded. It never clears and
> leaves the user with the impression that there was a problem loading the
> page. My web server logs at the mysite.com show that the browser does
> indeed make a request for the image and I get the querystring just fine and
> it returns a status of 200 so the image is being found and served ok.
>
> I've tried everything I can think of to solve this and really could use your
> help please. Bottom line is that if you use the "new Image" statment from
> within the OnLoad event of the Body tag, Netscape and Mozilla never seem to
> update the status bar to show "Done" despite it succesfully loading the
> image.
>
> Here is a simply snippet you can use to easily reproduce this issue:
>
> CASE A:
>
> <html>
> <body onLoad="var img = new Image(1, 1); img.src =
> 'http://www.mysite.com/img.gif';" >
> </html>
>
> Case A results in a status bar that indefinately shows "Transfering data
> from www.mysite.com..."
>
> Now interestingly if you change the .src so that its a relative URL instead
> of absolute the problem goes away, like this:
>
> CASE B:
> <html>
> <body onLoad="var img = new Image(1, 1); img.src = '/img.gif';" >
> </html>
>
> With this Case B the status bar says Done as expected and all works great.
>
> The challenge here is that the web server that the page is running from and
> the web server that I need to make the new Image .src request go to are two
> different servers. So I must use the absolute URL.


Browser requests the image from server A, server A gets the image from
server B, server A returns the image to the Browser.

Problem solved.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
 
Reply With Quote
 
 
 
 
Mike Dee
Guest
Posts: n/a
 
      02-20-2006
> Browser requests the image from server A, server A gets the image from
> server B, server A returns the image to the Browser.
>


Thanks. I'm not exactly seeing how this would work though. If the browser
requests the image from Server A using "new Image()" its making a request
for a .gif. So then how is server A going to act as a broker and make the
request to Server B and pass the result back to the browser?

I was thinking some more about the root cause. Maybe I can work around this
by purposely performing some other action after the image is loaded that
would some how result in the browser then realizing it was done and updating
its status line? Thoughts on this?

--- Mike


 
Reply With Quote
 
Mamidipalli
Guest
Posts: n/a
 
      03-01-2006
This isssue is not limited to Mozilla and Netscape. IE has the same
issue.
The Internet Explorer progress bar continues to increase when an
attached behavior is dynamically inserted in a page -
http://support.microsoft.com/default...;en-us;Q320731

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
disable title bar, status bar, and address bar of a window Matt HTML 9 08-23-2004 07:49 PM
javascript to disable the title bar, status bar, and address bar of a window Matt Javascript 9 08-23-2004 01:23 PM
Re: disable title bar, status bar, and address bar of a browser window John Hann ASP .Net 0 08-21-2004 05:07 AM
disable title bar, status bar, and address bar of a browser window Matt ASP .Net 0 08-21-2004 03:50 AM
Progress bar to show the progress of a task Charlie Zhang Java 3 08-16-2004 05:53 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57