Sign in to follow this  
malonso

updating unrelated innerHTML redraws chart

Recommended Posts

Hi All,

 

 

 

UPDATE: Even though I used the code IFCode, is still doesn't show up right in the post so I attached 2 txt files which house the HTML and XML code.

 

 

 

I noticed something really strange today and I am not sure if it is a fusion charts issue or a firefox issue b/c I am unable to reproduce it in IE7 or 8.

 

 

 

Description:

 

After drawing a chart, if I then click a button or link to run a javascript function that updates another element's innerHTML, it will redraw the chart.

 

 

 

I will try to include the code in this post but just in case it does not work it can also be found here: http://pastebin.com/m7f75f0e. The XML datafile referenced can be found here: http://pastebin.com/m18ba50b4.

 

 

 

Steps to reproduce:

 

1) Create page using the HTML below or at the link mentioned above. Make sure to change the reference to your FusionChartsWMode.js (or FusionCharts.js if you don't use the WMode fix) as well as your swf file.

 

2) Click on the button labeled "Draw Chart First" which will load the appropriate chart.

 

3) Click on either the link or the radio button once the chart has finished loading.

 

 

 

Every single time I tried this - on several different computers - it happened; each time I used FF 3.5.7. However, clicking the link or radio button more than once though has no effect and the issue only happens the first time - on my production site though it happens over and over again (can paste link later if necessary).

 

 

 

I also noticed that if the span w/the id "table_settings" doesn't contain a table it will not reload the chart.

 

 

 

Any ideas?

fcbug_html.txt

fcbug_xml.txt

Edited by Guest

Share this post


Link to post
Share on other sites

After speaking w/folks over at Mozilla, it appears that this was an issue w/reflow. Because the div and span were on the same "level", modifying the content of the span caused the div to be redrawn. I am sure I am screwing that description up but thought I would put it up there anyway. The solution was to either make the span a div or add "display: block" to the style info for the span.

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