473,698 Members | 2,271 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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="getImag e();"/>
<br />
<asp:HiddenFiel d ID="mapImageSrc _hidden" runat="server" />
</div>
</form>
</body>

2. Server-side Code:

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

Dim resultRefresh, urlImage
Dim mConnector As New aims.ArcIMSConn ector

mMap = Server.CreateOb ject("aims.Map" )
mConnector = Server.CreateOb ject("aims.ArcI MSConnector")
mConnector.Serv erName = "csfdcrw"
mConnector.Serv erPort = 5300

resultInit = mMap.InitMap(mC onnector, "Internal")

resultRefresh = mMap.Refresh()

urlImage = mMap.GetImageAs Url()

Me.mapImageSrc_ hidden.Value = urlImage

End Sub

3. Client-side Code:

function getImage()
{
var objHiddenImage = document.getEle mentById("mapIm ageSrc_hidden") ;
var objMapImage = document.getEle mentById("mapIm age");

objMapImage.src = objHiddenImage. value
}

Oct 31 '06 #1
3 2269
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.goo glegroups.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="getImag e();"/>
<br />
<asp:HiddenFiel d ID="mapImageSrc _hidden" runat="server" />
</div>
</form>
</body>

2. Server-side Code:

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

Dim resultRefresh, urlImage
Dim mConnector As New aims.ArcIMSConn ector

mMap = Server.CreateOb ject("aims.Map" )
mConnector = Server.CreateOb ject("aims.ArcI MSConnector")
mConnector.Serv erName = "csfdcrw"
mConnector.Serv erPort = 5300

resultInit = mMap.InitMap(mC onnector, "Internal")

resultRefresh = mMap.Refresh()

urlImage = mMap.GetImageAs Url()

Me.mapImageSrc_ hidden.Value = urlImage

End Sub

3. Client-side Code:

function getImage()
{
var objHiddenImage = document.getEle mentById("mapIm ageSrc_hidden") ;
var objMapImage = document.getEle mentById("mapIm age");

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
2901
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 timer at the beginning of the function with Timer1.Start();
3
3792
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 form, it stops updating it, but keeps on incrementing the Progress bar values in the background and displays the updated Pbar after finishing the operation G1. My requirement is that it should update during the execution of operation G1. On...
2
2950
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 through. However when you Add a new status bar to the form with a Progress bar and then immediately perform some intense programming that uses a lot of processor resources, the bars in the progress bar are not displayed, even though the timer appears to...
1
4253
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 updates a progress bar as data is processed and is also incrementing counters that are boing displayed in two textboxes. If I click on another window at this time and my application loses focus, the progress bar and textbox updating stops even though...
0
8674
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8604
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
8895
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8861
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6518
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4369
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4619
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3046
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2330
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.