Peter Tweed

Javascript Ie7 Only Errors

Recommended Posts

I have an ajax based webpage. When I try to reset / load the chart, I get JavaScript errors, only in IE7 (not firefox, IE8 etc).

I'm having great trouble debugging to find where the problem is (the joys of trying to debug JavaScript in IE7), but I know its Fusion Chart related (as removing the charts stops the error).

I'm also getting a problem on which the whole screen appears to freeze for a few seconds after each time the chart is refreshed (again - only in IE) but this is environment specific - the only difference being that out test environment isn't https while live is https (and the problem is in the https version). The charts are displaying correctly eventually.

Has anyone come across anything like this?

 

 

The rendered code (from view source):

 

<script language="JavaScript" src="/libraries/SMResources/FusionCharts/Charts/FusionCharts.js"></script><div id="ServiceTypebottomannuallinechartdiv" align="center">ServiceType Energy Consumption</div><script type="text/javascript">var chartbottom = new FusionCharts("/libraries/SMResources/FusionCharts/Charts/Line.swf?ChartNoDataText= ", "chartIDbottom", "410", "210", "0", "0");chartbottom.setTransparent(true);chartbottom.setDataXML("<chart bgAlpha='0' plotGradientColor=' ' showShadow='1' plotBorderColor='666666' plotBorderThickness='0.5' connectNullData='1' lineDashGap='8' lineThickness='3' bgColor='FFFFFF' rotateNames='0' chartLeftMargin='5' chartRightMargin='90' chartTopMargin='20' chartBottomMargin='35' showValues='0' showBorder='0' alternateHGridColor='ffffff' divLineColor='cfcfcf' divLineAlpha='50' baseFontColor='666666' lineColor='FF7900'><set name='Sun 02' value='97.058' color='FF7900'/><set name='Mon 03' value='104.655' color='FF7900'/><set name='Tue 04' value='57.943' color='FF7900'/><set name='Wed 05' value='102.074' color='FF7900'/><set name='Thu 06' value='' color='FF7900'/><set name='Fri 07' value='' color='FF7900'/><set name='Sat 08' value='' color='FF7900'/></chart>");chartbottom.render("ServiceTypebottomannuallinechartdiv");< /script></div>

 

 

 

The attachment contains the JavaScript errors, which all seem to happen around the fusion chart JavaScript.

 

Thanks (in advance) for your input

 

Peter

pausing issue.doc

Share this post


Link to post
Share on other sites
Guest Angie

Hi,

 

Welcome to FusionCharts Forum!smile.gif

 

Please find the modified code below:

 

 

<html>

<head>

<title>My First chart using FusionCharts - Compact Rendering Method</title>

<script type="text/javascript" src="../FusionCharts/FusionCharts.js"></script>

</head>

<body>

<div id="ServiceTypebottomannuallinechartdiv" align="center">ServiceType Energy Consumption</div>

<script type="text/javascript">

 

var chartbottom = new FusionCharts("../FusionCharts/Line.swf", "chartIDbottom", "410", "210", "0", "1");

chartbottom.setTransparent(true);chartbottom.setDataXML("<chart bgAlpha='0' plotGradientColor=' ' showShadow='1' plotBorderColor='666666' plotBorderThickness='0.5' connectNullData='1' lineDashGap='8' lineThickness='3' bgColor='FFFFFF' rotateNames='0' chartLeftMargin='5' chartRightMargin='90' chartTopMargin='20' chartBottomMargin='35' showValues='0' showBorder='0' alternateHGridColor='ffffff' divLineColor='cfcfcf' divLineAlpha='50' baseFontColor='666666' lineColor='FF7900'><set name='Sun 02' value='97.058' color='FF7900'/><set name='Mon 03' value='104.655' color='FF7900'/><set name='Tue 04' value='57.943' color='FF7900'/><set name='Wed 05' value='102.074' color='FF7900'/><set name='Thu 06' value='' color='FF7900'/><set name='Fri 07' value='' color='FF7900'/><set name='Sat 08' value='' color='FF7900'/></chart>");

chartbottom.render("ServiceTypebottomannuallinechartdiv");

</script>

</body>

</html>

 

Hope this helps.smile.gif

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