Not working with IE6

Posted by adelmazza 
Not working with IE6
February 11, 2009 11:35AM
Hi all...
I always have the following error with IE6 (with firefox it works good):

Line: xx
Char: xx
Error: 'JSChart' is not defined

On the same page I have also extjs and jquery...
Jscharts is the last javascript call

Many thanks for your help
A
Re: Not working with IE6
February 12, 2009 01:43AM
[www.css88.com]
I think it can help you!


<meta http-equiv="content-type" content="text/html;charset=utf-8">
Re: Not working with IE6
February 18, 2009 12:02PM
I am having the same problem.

I believe IE6 is unable to read the obfuscated javascript (IE7/Firefox3 seem to be OK)

I have created a very simple test :
<html>
<head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
  <script language="javascript" type="text/javascript" src="javascript/prototype.js"></script>
  <script language="javascript" type="text/javascript" src="javascript/jscharts.js"></script>
</head>  
<body id="page" class="home"  >
<div id="container" style="width:600px;height:300px;"></div>
<script type="text/javascript">
  var myData = new Array(['Bill', 2], ['Maria', 1], ['George', 3], ['Ann', 6]);
  var myChart = new JSChart('container', 'pie');
  myChart.setDataArray(myData);
  myChart.draw();
</script>
</body>
</html>

In IE6, that fails with "Line 27 Expected ')'", which I think occurs reading the jscharts.js script. It is immediately followed by "Line 10 'JSChart' is undefined", showing that the jscharts.js javascript has failed to be loaded correctly.

Any chance you could try less aggressive obfuscation?
Re: Not working with IE6
February 24, 2009 04:42AM
Change your meta tag to charset=Windows-1252
Re: Not working with IE6
February 24, 2009 10:46AM
It's not working for me in IE6 either. I have it on my website as it works in other browsers, so you can see it there, an example url is: [www.wherecaniski.com]

As you can see, the error is 'JSChart' not defined. The code I am using to generate the graph is below.

Please let me know if you can help! Aside from this, it's a great product.

Alex.

<SCRIPT type=text/javascript>

var myChart = new JSChart('chart_container', 'bar', '', '');
//myChart.setDataArray([[1, 20],[10, 60],[20, 79],[30, 90],[40, 100],[50, 113],[60, 125],[70, 135],[80, 148],[90, 170],[99, 215]]);
myChart.setDataArray([["01/02/2009", 3], ["24/02/2009", 0], ["25/02/2009", 0], ["26/02/2009", 0], ["27/02/2009", 0], ["28/02/2009", 0]]);

//myChart.colorize(['#3E90C9','#3E90C9','#3E90C9','#3E90C9','#3E90C9','#3E90C9','#3E90C9','#3E90C9','#3E90C9','#3E90C9','#3E90C9']);

myChart.setSize(550, 300);
myChart.setLineColor('#0070B8');
myChart.setTitle('Cumulative Snow Forecast for Zermatt');
myChart.setTitleFontSize(10);
myChart.setIntervalStartY(0);
myChart.setAxisNamehot smiley' ');
myChart.setAxisNameY(' ');
myChart.setAxisValuesNumberY(5);
myChart.setIntervalEndY(8000);
myChart.setTitleColor('#37379E');
myChart.setTitleFontSize(10);
myChart.setLineColor('#3E90C9');
myChart.setLineOpacity(1);
myChart.setLineWidth(2);
myChart.setAxisValuesColor('#37379E');
myChart.setAxisNamehot smiley'%');
myChart.setAxisNameY(' ');
myChart.setTooltip([1,"20"]);
myChart.setFlagRadius(4);
myChart.setAxisValuesNumberY(10);
myChart.setIntervalEndY(0);
myChart.setIntervalStartY(0);

myChart.draw();

</SCRIPT>
Re: Not working with IE6
March 02, 2009 06:54AM
myChart.setIntervalEndY(0);
myChart.setIntervalStartY(0);
setIntervalEndY() should always be higher than setIntervalStartY().

About the other errors mentioned in this topic... It is about the SVG charset again, which seems to limit our users too much already.
Mndatamule is right, IE6 seems not to like one or more of the characters in the source code if the page Content-Type is set to utf-8.
We will definitely renounce to SVG rendering for texts in the next versions, until then I can't find other solution than to change the Content-Type.

Sabin

--------------------
JS Charts - Created by Smartketer LLC
Re: Not working with IE6
March 02, 2009 07:54AM
ie6 charset = windows-1252
ie7\ff charset = utf-8
Re: Not working with IE6
March 04, 2009 04:50PM
Hmmm... that's still not working. I changed the logic for assigning the Y interval values so that it now sets sensible values:
myChart.setIntervalStartY(0);
myChart.setIntervalEndY(29);


And, if you look at my page source (e.g. [www.wherecaniski.com]) you can see that I've changed the char set as per the advice on this forum:
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">

The error is the same (i.e. JSChart) is undefined. Could another library be interfering with the object? Strange though, as this is only in IE6 grrrrrrrr

Thank you all for your help with this.
Alex.
Re: Not working with IE6
March 09, 2009 05:45AM
very thank you....
Re: Not working with IE6
March 09, 2009 09:46AM
Hi Alex, try to save you file as ANSI encoding
Re: Not working with IE6
March 15, 2009 12:53PM
That worked! Here it is in action, fully IE compatible.... [www.wherecaniski.com]

Thanks! Alex.
Re: Not working with IE6
March 16, 2009 06:49AM
And how to run with IE6 also can run with IE7 ????

Can any one help me ??
Re: Not working with IE6
March 20, 2009 12:06PM
Hi

I'm trying to evaluate your framework and I'm having the same problem. In my case IE 6 support is a must-have and changing the encoding is not an option. Are you going to release working version? If so, when can we expect it?
Re: Not working with IE6
March 20, 2009 12:36PM
Nevermind, I found a simple workaround which is to convert jscharts.js to UTF-8.

Cheers!
Sorry, you do not have permission to post/reply in this forum.