473,324 Members | 2,535 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,324 software developers and data experts.

IE progress bar never stops incrementing...

Hello,

I'm able to reproduce my problem but I haven't been able to figure out
why it is happening. MS does have an article about such behavior in
http://support.microsoft.com/default...;en-us;Q320731 but the
workaround prescribed in the KB isn't particularly helpful.

The project I'm working on serves up a custom jpg image on the client
side at runtime (think MapQuest or Google Maps). We use a COTS product
here to handle the image creation. You'll see the references to the
COTS in the code below through use of the "aims" namespace. As you
will also see, there's no rocket science to the code I've posted.

I'm using some code which was given to me. I've pasted it below in as
a lightweight version. To support some custom functionality (zooming
in and out and identifying objects on the map via a mouseclick among
other things), this code creates the jpg on the server side, places the
path to the jpg in a hidden field, and then on the client side the
hidden field value is set to an html img src.

The problem is the browser's progress bar always keeps increasing and
never stops. Everything else appears to be working normally and the
user can mess around with the page. But the cursor always stays as the
hourglass and pointer combo and the browser's progress bar never
stops incrementing (albeit very slowly).

Eventually, as the page runs for an extended period of time, the
browser throws a stack overflow and the whole thing starts hindering
the performance of the host machine. I did some debugging and noticed
that the codebehind Page_Load event handler keeps getting called
repeatedly. Thinking this was because of the time it takes for the
image to be displayed versus rending the rest of the page, the whole
thing thinks the Page_Load event never completes... kind like an
infinite loop. To get around that I tried wrapping the code in the
Page_Load event handler in an If Not Page.IsPostBack... but that didn't
help either.

I'm now suspecting the problem could be due to the img onload event
handler clashing with the code behind Page_Load event handler. But
nothing too terribly complicated is going on there... I'm just going
out and assigning the src property to the hidden field's value
property.

Suggestions are greatly appreciated.

Thanks!

1. HTML:

<body>
<form id="form1" runat="server">
<div>
<img id="mapImage" src="Images/null.gif" onload="getImage();"/>
<br />
<asp:HiddenField ID="mapImageSrc_hidden" runat="server" />
</div>
</form>
</body>

2. Server-side Code:

Protected Sub Page_Load(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Me.Load

Dim resultRefresh, urlImage
Dim mConnector As New aims.ArcIMSConnector

mMap = Server.CreateObject("aims.Map")
mConnector = Server.CreateObject("aims.ArcIMSConnector")
mConnector.ServerName = "csfdcrw"
mConnector.ServerPort = 5300

resultInit = mMap.InitMap(mConnector, "Internal")

resultRefresh = mMap.Refresh()

urlImage = mMap.GetImageAsUrl()

Me.mapImageSrc_hidden.Value = urlImage

End Sub

3. Client-side Code:

function getImage()
{
var objHiddenImage = document.getElementById("mapImageSrc_hidden");
var objMapImage = document.getElementById("mapImage");

objMapImage.src = objHiddenImage.value
}

Oct 31 '06 #1
3 2231
run a network traffic sniffer, fiddler or simular. also check the iis logs
to see if any errors are generated.

-- bruce (sqlwork.com)

"Adam Sandler" <co****@excite.comwrote in message
news:11**********************@e64g2000cwd.googlegr oups.com...
Hello,

I'm able to reproduce my problem but I haven't been able to figure out
why it is happening. MS does have an article about such behavior in
http://support.microsoft.com/default...;en-us;Q320731 but the
workaround prescribed in the KB isn't particularly helpful.

The project I'm working on serves up a custom jpg image on the client
side at runtime (think MapQuest or Google Maps). We use a COTS product
here to handle the image creation. You'll see the references to the
COTS in the code below through use of the "aims" namespace. As you
will also see, there's no rocket science to the code I've posted.

I'm using some code which was given to me. I've pasted it below in as
a lightweight version. To support some custom functionality (zooming
in and out and identifying objects on the map via a mouseclick among
other things), this code creates the jpg on the server side, places the
path to the jpg in a hidden field, and then on the client side the
hidden field value is set to an html img src.

The problem is the browser's progress bar always keeps increasing and
never stops. Everything else appears to be working normally and the
user can mess around with the page. But the cursor always stays as the
hourglass and pointer combo and the browser's progress bar never
stops incrementing (albeit very slowly).

Eventually, as the page runs for an extended period of time, the
browser throws a stack overflow and the whole thing starts hindering
the performance of the host machine. I did some debugging and noticed
that the codebehind Page_Load event handler keeps getting called
repeatedly. Thinking this was because of the time it takes for the
image to be displayed versus rending the rest of the page, the whole
thing thinks the Page_Load event never completes... kind like an
infinite loop. To get around that I tried wrapping the code in the
Page_Load event handler in an If Not Page.IsPostBack... but that didn't
help either.

I'm now suspecting the problem could be due to the img onload event
handler clashing with the code behind Page_Load event handler. But
nothing too terribly complicated is going on there... I'm just going
out and assigning the src property to the hidden field's value
property.

Suggestions are greatly appreciated.

Thanks!

1. HTML:

<body>
<form id="form1" runat="server">
<div>
<img id="mapImage" src="Images/null.gif" onload="getImage();"/>
<br />
<asp:HiddenField ID="mapImageSrc_hidden" runat="server" />
</div>
</form>
</body>

2. Server-side Code:

Protected Sub Page_Load(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Me.Load

Dim resultRefresh, urlImage
Dim mConnector As New aims.ArcIMSConnector

mMap = Server.CreateObject("aims.Map")
mConnector = Server.CreateObject("aims.ArcIMSConnector")
mConnector.ServerName = "csfdcrw"
mConnector.ServerPort = 5300

resultInit = mMap.InitMap(mConnector, "Internal")

resultRefresh = mMap.Refresh()

urlImage = mMap.GetImageAsUrl()

Me.mapImageSrc_hidden.Value = urlImage

End Sub

3. Client-side Code:

function getImage()
{
var objHiddenImage = document.getElementById("mapImageSrc_hidden");
var objMapImage = document.getElementById("mapImage");

objMapImage.src = objHiddenImage.value
}

Oct 31 '06 #2

bruce barker (sqlwork.com) wrote:
run a network traffic sniffer, fiddler or simular. also check the iis logs
to see if any errors are generated.

-- bruce (sqlwork.com)
Thanks for the reply. There are no errors in IIS. Not sure how a
network analyzer will help me solve a problem with a dynamic content
problem... I moved the project to the same server as the the map
service (it creates the jpg), and got the same results.

Oct 31 '06 #3

bruce barker (sqlwork.com) wrote:
run a network traffic sniffer, fiddler or simular. also check the iis logs
to see if any errors are generated.

-- bruce (sqlwork.com)
Thanks for the reply. There are no errors in IIS. Not sure how a
network analyzer will help me solve a problem with a dynamic content
problem... I moved the project to the same server as the the map
service (it creates the jpg), and got the same results.

Oct 31 '06 #4

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

Similar topics

1
by: Steven Blair | last post by:
Hi, Having a bit of a problem with the Progress Bar and Timer component. Basically, when I execute a menu option, I need the progress bar to start working. I have managed this and start the...
3
by: Vinay | last post by:
Hello I am trying to update a Progress bar on a form. I am able to update it via using a simple clock timer, but as soon as I perform a long operation G1 (generation of a report) in a separate...
2
by: Robert Smith | last post by:
Hello, I have a problem with my progress bar, as shown in the attached code, the values on the bar are incremented within a threaded timer event. The timer works fine and ticks all the way...
1
by: zacks | last post by:
I am using VB.NET 2005, but I have seen this problem in 2003 also. I have a windows form based application. When the user clicks on the main command button it goes off and does its thing. It...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
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: 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: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.