Sign in to follow this  
twism113

Unable to navigate away while chart is loading

Recommended Posts

Hello all!

 

 

 

I have noticed this behavior for a while now, but never thought to ask about it. Basically I have web page where I am loading several charts that retrieve data using the dataURL method. The main reason we are using this method is because the data we are loading requires some very time consuming database queries to pull information, therefore loading the data in a separate page reduces the amount of time the main page takes to load and the chart generates after that.

 

 

 

As it looks now, you go to the page, the content loads and completes in less than a second, then the FusionCharts retrieves information and it is displayed taking roughly 10-20 seconds. The main problem I have been running into is if I want to navigate away, to another page while the chart is pulling information, I have to wait for each and every chart to complete its request.

 

 

 

I am using AJAX behaviors on several pages and if there is a request in progress and the user navigates away from the page the request is simply canceled.

 

 

 

I have tried many different methods to get around this issue and had no luck including calling the JavaScript that loads the chart with an AJAX request. I am really hoping for a workaround for this issue.

 

 

 

The page is a reporting interface for managers who will likely want to quickly navigate away from the first page, however the charts on the main page are very important in this case.

 

 

 

Any thoughts are appreciated.

Edited by Guest

Share this post


Link to post
Share on other sites

Hi,

 

As far as the navigation problem is concerned, as u r using ajax so, until ur page loads and completes ur browser will hang, until the page has finished its loading.

 

And while loading anything via Ajax it will be automatically dissapear as using Ajax there will be no postback so ur controls cannot hold the values.

 

 

 

Hope this helps U...

Share this post


Link to post
Share on other sites

AJAX requests do not hang a browser! and navigating away from a page will naturally stop the AJAX request.

That's just how AJAX works.

Edited by Guest

Share this post


Link to post
Share on other sites

No Ajax request will hang ur browser until ur request is completed.

 

That is if you are populating ur controls via javascript, for e.g. if u use Asp.Net Ajax control as it is a server control it will not hang the browser but if u use ajaxpro as it depends both on javascript and server it will eventually until ur call is processed or the execution time is exceeded.

Share this post


Link to post
Share on other sites
No Ajax request will hang ur browser until ur request is completed.

Really, mine don't, never have and never will, So if it is happening are you sure it's to do with AJAX, seings it's just javascript making a HTTP request to a server and receiving back simple XML.

Unless you have the switch in the HTTPRequest component to be 'Syncronous' and that's causing the problem, because your telling the request to wait for a response, though I don't use syncronous mode normally , I did play with the switch out of curiosity and I couldn't see a difference in my AJAX apps.

Share this post


Link to post
Share on other sites

Strange, but my application seem to hang the browser.:) Well i have completed 3 projects using Ajax only and i have encountered the same in all 3 application with asynchronous mode. Fine can u tell me how much data r u displaying via ajax as i have almost 2000 record may be that be a reason for the browser getting hanged.Seems i have to find the right answer.

 

Thanks for ur replies, it made me realize my mistakes..

Share this post


Link to post
Share on other sites

Has anyone from Fusion Charts weighed in on this yet?  I am having the same issue. 

I am using the setDataURL method.  I have tested this where I added a sleep command to my data XML page to intentionally simulate a slow data page.  On my chart page, the browser freezes until the XML is returned to the chart. 

I am using Firefox 3.0.10 and IE 7.

It seems like the call for the XML is blocking other processes.  Is there a way to make this call asyncronous so as NOT to lock the browser?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this