Sign in to follow this  
niksii

Uncaught TypeError: Object #<Object> has no method 'setXMLUrl'

Recommended Posts

Hi.

I tried to put pure Javascript to my page but console says: "Uncaught TypeError: Object #<Object> has no method 'setXMLUrl'". My code looks like this:

<html>
<head>
<title>kokeilu</title>
<script type="text/javascript" src="templates/FusionCharts/FusionCharts.js"></script>
<script type="text/javascript" src="templates/FusionCharts/jquery.min.js"></script>
</head>
<body>
<div id="chartContainer">Tähän tulee kuvaaja.</div>
<script type="text/javascript"><!--


                                var myChart = new FusionCharts( "MSLine", "myChartId", "400", "300" );
                                myChart.setXMLUrl("templates/Data/esimerkkiData.xml");
                                myChart.render("chartContainer");


                                // -->
                            </script>
</body>
</html>

As you can see, it is very simple. I have MSLine.swf in the same folder with javascript-files (if it is needed to be there). For some reason I am not able to get this working.

Edited by niksii

Share this post


Link to post
Share on other sites
Guest Rishab

Hi,

 

Welcome to FusionCharts forum,

 

There are four main JavaScript files needed to render the chart- FusionCharts.js, FusionCharts.HC.js, FusionCharts.HC.Charts.js and jquery.min.js.

 

The error you are getting might be because of some FusionCharts JS files missing or there may be the path error .

 

Kindly refer to the sample attached and modify it according to your needs.

 

Hope this helps!

Sample.zip

Edited by Rishab

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