Sign in to follow this  
Pallav

IE <> FF Ajax Chart

Recommended Posts

i setup a test page at

 

it works perfectly in firefox (2.0) but not in IE 6 or 7.

 

 

 

Sometimes it loads the startup chart in IE but as soon as i select other weeks from the dropdown and submit the page it shows no data anymore. feels like it doesnt wait until the dataXML was fully generated. but thats a n00bs call....

 

 

 

i know the page is messy coded but perhaps you know about cases like this?

 

the querystring &debug=1 can be used on the page.

 

 

 

Thank You

Share this post


Link to post
Share on other sites

Can you please let us know the process flow happening in that place? Like how the chart is generated first time and then when form is updated?

Share this post


Link to post
Share on other sites

built a new testpage @

 

there the round dropdowns are now ajaxed too. the season selector still submits the form though...

 

at first time it seems to work in IE but after submitting (=selecting another season) the form or reloading the page it most of the times doesnt work...

 

 

 

the flow:

 

1) asp opens a filestream of a csv serverside and builds an array thats

 

2) output in a javascript array

 

3) the javascript functions i took and altered from your JS_Example.html (updateChart(), generateXML(), getProductXML()) build the XML and setDataXML for the chart

 

4) the per javascript implemented chart renders the XML

 

 

 

if the form is submitted the whole process is repeated from the beginning.

 

 

 

i hope thats all the info you wanted!

Edited by Guest

Share this post


Link to post
Share on other sites

Actually, there are too many processes involved in this for us to debug - as we do not have enough information on your environment too.

If you can pull it down to minimal skeletal structure required and just the exact error, we can help you debug it.

Share this post


Link to post
Share on other sites

http://www.databased.at/hattrick/mystats_economy.htm

 

thats now a static page that does not use any vbscript to get the data. so just html and javascript (see source code of that page).

 

 

 

internet explorer behaviour:

 

> load the page in internet explorer for the first time and it will work.

 

> reload the page and most of the times it wont work anymore....

 

> sometimes if you hammer reload fast a few times in a row you get it to display again...

 

> it will work again for sure only the first time after you closed the browser and started it again

 

 

 

since there is nothing done serverside (except delivering the htm file) the environment is the local computer. i tried a few and everywhere the same.

 

 

 

cannot get the problem to show more obvious.

 

i hope you can help since i really tried and still try a lot to get it to work.

Edited by Guest

Share this post


Link to post
Share on other sites

Hi,

In your code, can you explain why you're doing this:

1. In DIV, using EMBED code to render the chart:

<div id="chart1div" align="center"><embed type="application/x-shockwave-flash" src="./FusionCharts3/charts/StackedColumn3DLineDY.swf" id="chart1Id" name="chart1Id" quality="high" allowscriptaccess="always" flashvars="chartWidth=725&chartHeight=350&debugMode=0&DOMId=chart1Id&registerWithJS=1&scaleMode=noScale&lang=EN&dataXML=<chart></chart>" height="350" width="725"></div>

 <script language="JavaScript">  

 var chart1 = new FusionCharts("./FusionCharts3/charts/StackedColumn3DLineDY.swf?ChartNoDataText=not enough categories selected", "chart1Id", "725", "350", "0", "1");

 chart1.setDataXML("<chart></chart>");

 chart1.render("chart1div");

 </script>

This entire code section is very weird.

Share this post


Link to post
Share on other sites

That must have happened when i saved the html via the browser ... sorry

 

removed it from the html testpage... behaviour still the same i am afraid :/

 

 

 

normally it just looks like

 

 

 

<div id="chart1div" align="center">FusionCharts</div>

 

<script language="JavaScript">

 

var chart1 = new FusionCharts("./FusionCharts3/charts/StackedColumn3DLineDY.swf?ChartNoDataText=not enough categories selected", "chart1Id", "725", "350", "0", "1");

 

chart1.setDataXML("<chart></chart>");

 

chart1.render("chart1div");

 

</script>

 

 

 

which should be ok

Share this post


Link to post
Share on other sites

The code here looks absolutely right. Few questions:

  • Does the chart initially load with no data?
  • Does it load everytime with no data when refreshed?
  • When data is sent through JS, does it respond properly first time?
  • When data is sent through JS, does it respond properly each time thereafter?
  • When data is sent through JS, does it respond properly when refreshed?

Share this post


Link to post
Share on other sites

all answers related to IE behaviour:

 

 

 

> Does the chart initially load with no data?

 

the chart is supplied with data at first load and shows it (which works always at least the first time of the browser session)

 

 

 

> Does it load everytime with no data when refreshed?

 

not everytime. sometimes when refreshed it shows the chart

 

 

 

> When data is sent through JS, does it respond properly first time?

 

> When data is sent through JS, does it respond properly each time thereafter?

 

(i interpret "data sent through JS" as re-rendering the chart via user interaction on same page. i hope thats what you meant)

 

yes. if the data was initially rendered the chart will respond to JS

 

 

 

> When data is sent through JS, does it respond properly when refreshed?

 

(?) when refreshed via browser button or loaded on top via a link within the same session it happens that the chart wont render.. which is the core problem

 

 

 

note:

 

i came home late tonight and now as i answer your questions i tried the testpage again. it seemed like it worked more often than usual (usual = during daytime (Europe) when more users are online at my site)...

 

 

 

thanks for your time.

 

thomas

Share this post


Link to post
Share on other sites

Thomas,

I'm afraid I'm not experiencing any such problems - and that's what is taking us long to get to the base of this problem. Ideally, there shouldn't be any co-relation with chart rendering and the number of visits on your server, as the chart is generated at client side. The SWF and XML gets downloaded the client and then the chart is rendered. So, I'm not sure if that's a load problem. And, in fact, FusionCharts is being used effectively on a lot of websites (and in their home pages too) that get multi-million hits each day.

This has to be something related to JavaScript and timing of data being loaded at client side. If you're getting data from server using JavaScript and then providing it to chart, the time lag here could differ, and this is what could crash. Can you please put some checks on this and see if you get a pointer here?

Share this post


Link to post
Share on other sites

quote: If you're getting data from server using JavaScript and then providing it to chart, the time lag here could differ, and this is what could crash.

 

 

 

at the testpage i setup everything is hardcoded into the page so no server interaction other than loading the html page here.

 

 

 

anyway, i will publish the charts and see how my users respond. if the problem persists i would get back to you here.

 

thanks for your assistance so far!

 

/thomas

Edited by Guest

Share this post


Link to post
Share on other sites

perhaps some feedback from other fusioncharts users...?

 

 

 

please try http://www.databased.at/hattrick/mystats_economy.htm with your Internet Explorer.

 

after it loaded the first time hit the reload button of the browser a few times. Do you sometimes or even always get the message "not enough categories selected" ?

 

 

 

would highly appreciate some feedback from a few people :exclamationmark:

Edited by Guest

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