Mike Dee said the following on 2/20/2006 11:09 AM:[color=blue]
> 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.[/color]
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/