Js error in firefox

210 views
Skip to first unread message

krishna savith

unread,
Dec 1, 2011, 4:26:20 AM12/1/11
to Google Visualization API
Hi,

I am using google charts in my website. when I load the package using
google.load("visualization", "1", {packages:["corechart"]}); firexfox
is throwing error like "Error: Error enumerating properties on
scriptable plugin object
Source File: http://www.google.com/uds/api/visualization/1.0/92cbb0f92b037d8f5681d4066f62a719/format+en,default,corechart.I.js
Line: 183". Please help me with this
.

Roni Biran

unread,
Dec 1, 2011, 5:01:07 AM12/1/11
to google-visua...@googlegroups.com
I'm using the same package over 15 charts in a same page without any problems on all browsers (IE, FF, Chrome, Safari)

Maybe your implementation of the charts is wrong?




--
You received this message because you are subscribed to the Google Groups "Google Visualization API" group.
To post to this group, send email to google-visua...@googlegroups.com.
To unsubscribe from this group, send email to google-visualizati...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-visualization-api?hl=en.


krishna savith

unread,
Dec 1, 2011, 5:19:53 AM12/1/11
to Google Visualization API
I found the root cause of the error. I am using swfobject.js which is
conflicting with the google chart.js. that is why it is throwing the
error. when i remove swfobject.js then its working fine. But i am
wondering why this conflict is not there in IE. Can any one help me?

On Dec 1, 3:01 pm, Roni Biran <roni.bi...@gmail.com> wrote:
> I'm using the same package over 15 charts in a same page without any
> problems on all browsers (IE, FF, Chrome, Safari)
>
> Maybe your implementation of the charts is wrong?
>
> On Thu, Dec 1, 2011 at 11:26 AM, krishna savith

> <krishnasavith...@gmail.com>wrote:


>
> > Hi,
>
> > I am using google charts in my website. when I load the package using
> > google.load("visualization", "1", {packages:["corechart"]}); firexfox
> > is throwing error like "Error: Error enumerating properties on
> > scriptable plugin object
> > Source File:

> >http://www.google.com/uds/api/visualization/1.0/92cbb0f92b037d8f5681d...

Roni Biran

unread,
Dec 1, 2011, 5:32:03 AM12/1/11
to google-visua...@googlegroups.com
That's because FF isn't so gentle on JavaScript conflicts, unlike the rest. The thin is that the corechart loads flash using the exact code, so that the reason for the conflicts.


krishna savith

unread,
Dec 1, 2011, 5:36:14 AM12/1/11
to google-visua...@googlegroups.com
Can you please provide me a solution to avoid the conflict?

Roni Biran

unread,
Dec 1, 2011, 8:46:45 AM12/1/11
to google-visua...@googlegroups.com
What version of swfobject.js are you running?
I placed the latest version 2.2 with the google JAPI in the same page without any problems.

can you send a demo page?

krishna savith

unread,
Dec 2, 2011, 1:37:58 AM12/2/11
to google-visua...@googlegroups.com
Sorry for the late response. I am also using 2.2 version. html of the demo page is

<html>
  <head>
    <!--Load the AJAX API-->
    <script type="text/javascript" src="https://www.google.com/jsapi"></script>
    <script type="text/javascript" src="swfobject.js"></script>
    <script type="text/javascript">
   
      // Load the Visualization API and the piechart package.
      google.load('visualization', '1.0', {'packages':['corechart']});
     
      // Set a callback to run when the Google Visualization API is loaded.
      google.setOnLoadCallback(drawChart);
     
      // Callback that creates and populates a data table,
      // instantiates the pie chart, passes in the data and
      // draws it.
      function drawChart() {

      // Create the data table.
      var data = new google.visualization.DataTable();
      data.addColumn('string', 'Topping');
      data.addColumn('number', 'Slices');
      data.addRows([
        ['Mushrooms', 3],
        ['Onions', 1],
        ['Olives', 1],
        ['Zucchini', 1],
        ['Pepperoni', 2]
      ]);

      // Set chart options
      var options = {'title':'How Much Pizza I Ate Last Night',
                     'width':400,
                     'height':300};

      // Instantiate and draw our chart, passing in some options.
      var chart = new google.visualization.PieChart(document.getElementById('chart_div'));
      chart.draw(data, options);
    }
    </script>
  </head>

  <body>
    <!--Div that will hold the pie chart-->
        <script type="text/javascript">
var flashvars = {};
var params = {quality:"high", wmode:"transparent"};
var attributes = {styleclass:"swfObject"};
swfobject.embedSWF("animationPoints.swf", "img1hotspot2", "35", "35", "6.0.65.0","expressInstall.swf", flashvars, params, attributes);
</script>
        <div id="img1hotspot2">&nbsp;</div>
    <div id="chart_div"></div>
  </body>
</html>


Can you please look into the issue ?

Roni Biran

unread,
Dec 2, 2011, 10:23:51 AM12/2/11
to google-visua...@googlegroups.com
sorry for the delay....
I ran your script with a small flash named "animationPoints.swf" and a swfobject.js file taken from "http://ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js" on every browser that I have (IE, FF, Chrome and Safari) and it ran perfectly.
The only thing I can think of that your flash calls JavaScript on the page and that messes everything.

Try placing another flash, even an empty one and see if your script fails.

krishna savith

unread,
Dec 2, 2011, 12:39:56 PM12/2/11
to google-visua...@googlegroups.com
Thanks for your response.

one thing i would like to know is whether u have run the script in firefox or not ... please let me know if it runs fine in firefox also.

krishna savith

unread,
Dec 2, 2011, 12:44:33 PM12/2/11
to google-visua...@googlegroups.com
and one more thing i would like to add is script is running fine in all the browsers  even in firefox . But i am getting an error as mentioned before in error console, error is not at all affecting the functionaly.

Roni Biran

unread,
Dec 2, 2011, 2:10:21 PM12/2/11
to google-visua...@googlegroups.com
as I said, I tested it on: Microsoft Internet Explorer 8+9, Chrome 15, Safari (latest version) and Both Firefox 3.6 and the new Firefox (downloaded today 8) and it ran perfectly on all platforms

asgallant

unread,
Dec 2, 2011, 3:18:40 PM12/2/11
to google-visua...@googlegroups.com
If the script runs fine, then the error isn't a serious one.  Firefox throws errors for every single event or property that is even slightly off of what is expected.  As an example, FF throws 44 errors loading www.google.com; none of them are of any significance.

krishna savith

unread,
Dec 2, 2011, 4:08:06 PM12/2/11
to google-visua...@googlegroups.com
Thanks a lot Roni Biran

On Sat, Dec 3, 2011 at 1:48 AM, asgallant <drew_g...@abtassoc.com> wrote:
If the script runs fine, then the error isn't a serious one.  Firefox throws errors for every single event or property that is even slightly off of what is expected.  As an example, FF throws 44 errors loading www.google.com; none of them are of any significance.

--
You received this message because you are subscribed to the Google Groups "Google Visualization API" group.
Reply all
Reply to author
Forward
0 new messages