Jump to content


Error In Chrom Console


  • Please log in to reply
6 replies to this topic

#1 babuu

babuu

    Forum Member

  • Members
  • PipPipPipPip
  • 25 posts

Posted 03 August 2012 - 09:53 AM

Hi all,

I am working on pure javascript fusion charts for all browsers.

FF and IE Working fine but Chrome not working

I am getting this error in chrome.

XMLHttpRequest cannot load file:///C:/wamp/www/export/charts/Data.xml. Origin null is not allowed by Access-Control-Allow-Origin.





Could any help....

#2 Sumedh

Sumedh

    Supreme Being

  • Administrators
  • 1955 posts
  • LocationBangalore

Posted 03 August 2012 - 11:38 AM

Hi,

Please send us the information on following points:

> What FusionCharts version are you using?

> Send us the sample code to replicate the issue at our end.

> What chart type used? Send us the chart XML also.
Thanks,
Sumedh

Follow us @Twitter!

#3 babuu

babuu

    Forum Member

  • Members
  • PipPipPipPip
  • 25 posts

Posted 03 August 2012 - 12:46 PM

Thanks for reply ,


1. Version fusioncharts/3.2.3-sr3.5347

2.
<script type="text/javascript">
FusionCharts.setCurrentRenderer('JavaScript');
var myChart = new FusionCharts( "charts/Column2D.swf", "myChartId", "300", "300", "0", "1" );
myChart.setXMLUrl("charts/Data.xml");
myChart.render("chartContainer");

-->
</script>

3. (chart XML)
<chart caption='Monthly Revenue' xAxisName='Month' yAxisName='Revenue'
numberPrefix=' showValues='0' exportAtClient="0"
html5ExportHandler="http://localhost/exp...arts/index.php"
exportEnabled='1' exportAction='save' exportShowMenuItem='1'>
<set label='Jan' value='420000' />
<set label='Feb' value='910000' />
<set label='Mar' value='720000' />
<set label='Apr' value='550000' />
<set label='May' value='810000' />
<set label='Jun' value='510000' />
<set label='Jul' value='680000' />
</chart>

Please check above details as per asked.

Thanks
Babu

Hi,

Please send us the information on following points:

> What FusionCharts version are you using?

> Send us the sample code to replicate the issue at our end.

> What chart type used? Send us the chart XML also.



#4 babuu

babuu

    Forum Member

  • Members
  • PipPipPipPip
  • 25 posts

Posted 03 August 2012 - 02:16 PM

Sorry forgot chart type,

Column2D.swf

Thanks for reply ,


1. Version fusioncharts/3.2.3-sr3.5347

2.
<script type="text/javascript">
FusionCharts.setCurrentRenderer('JavaScript');
var myChart = new FusionCharts( "charts/Column2D.swf", "myChartId", "300", "300", "0", "1" );
myChart.setXMLUrl("charts/Data.xml");
myChart.render("chartContainer");

-->
</script>

3. (chart XML)
<chart caption='Monthly Revenue' xAxisName='Month' yAxisName='Revenue'
numberPrefix=' showValues='0' exportAtClient="0"
html5ExportHandler="http://localhost/exp...arts/index.php"
exportEnabled='1' exportAction='save' exportShowMenuItem='1'>
<set label='Jan' value='420000' />
<set label='Feb' value='910000' />
<set label='Mar' value='720000' />
<set label='Apr' value='550000' />
<set label='May' value='810000' />
<set label='Jun' value='510000' />
<set label='Jul' value='680000' />
</chart>

Please check above details as per asked.

Thanks
Babu




#5 Swarnam

Swarnam

    Supreme Being

  • Moderators
  • 735 posts

Posted 04 August 2012 - 08:04 AM

Hey Babu,

Thank you for all inputs.

Many browsers restrict JavaScript from accessing local file system owing to security reasons. The JavaScript charts, when running locally, will not be able to access data provided using setXMLUrl function. If you run the files from a server, it will run absolutely fine, though. When running locally, however, if you use setXMLData function , it works fine.

Hope this helps.

#6 babuu

babuu

    Forum Member

  • Members
  • PipPipPipPip
  • 25 posts

Posted 06 August 2012 - 02:30 PM

Thank you for response.

Hey Babu,

Thank you for all inputs.

Many browsers restrict JavaScript from accessing local file system owing to security reasons. The JavaScript charts, when running locally, will not be able to access data provided using setXMLUrl function. If you run the files from a server, it will run absolutely fine, though. When running locally, however, if you use setXMLData function , it works fine.

Hope this helps.



#7 Swarnam

Swarnam

    Supreme Being

  • Moderators
  • 735 posts

Posted 07 August 2012 - 04:32 AM

:)