Object doesn't support property or method 'createElementNS'

2,941 views
Skip to first unread message

Mr Morgan

unread,
Mar 16, 2011, 6:11:06 AM3/16/11
to Google Visualization API
Hello

All of a sudden when I run web pages in Internet Explorer (versions 8
and 9) containing calls to the Google VizAPi, I find that I am given
the following message:

Object doesn't support property or method 'createElementNS'

This does not happen in Firefox so it is presumably an IE thing. Can
anyone shed any light on it?

Thanks

Mr Morgan.

Viz Kid

unread,
Mar 16, 2011, 12:36:19 PM3/16/11
to google-visua...@googlegroups.com

Are you using the release candidate version 1.1 or the stable release 1.0?
When you say there is an issue with IE8, is it real IE8 or is it IE9 in IE8 mode? And in IE9, which version are you using?
Does this happens consistently for you in all examples or only in some specific cases?

  Viz Kid


--
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.


Mr Morgan

unread,
Mar 16, 2011, 7:35:59 PM3/16/11
to Google Visualization API
As far as I can tell, I get the message with with my own
visualisations using code like this:

<script type = "text/javascript" src = "http://www.google.com/jsapi"></
script>

<script type = "text/javascript">

// With thanks to http://code.google.com/apis/visualization/.

google.load("visualization", "1", {packages:
["corechart"]});
google.setOnLoadCallback(drawChart);

function drawChart() {
var data = new
google.visualization.DataTable();

data.addColumn('string', 'Polling date time');
data.addColumn('number', 'pakistan');
data.addColumn('number', 'berry');
data.addColumn('number', 'queensland');
data.addColumn('number', 'postlethwaite');
data.addColumn('number', 'facebook');
data.addColumn('number', 'india');
data.addColumn('number', 'latvia');
data.addColumn('number', 'korea');
data.addColumn('number', 'egypt');
data.addRows(1);
data.setValue(0, 0, '16 03 2011 @ 23 23');
data.setValue(0, 1, 114);
data.setValue(0, 2, 1);
data.setValue(0, 3, 59);
data.setValue(0, 4, 7);
data.setValue(0, 5, 16);
data.setValue(0, 6, 90);
data.setValue(0, 7, 2);
data.setValue(0, 8, 55);
data.setValue(0, 9, 296);
var chart = new
google.visualization.ColumnChart(document.getElementById('sampleVisualisation'));


// Render SampleVisualisation.
chart.draw(data, {width: 800, height: 640,
tooltipTextStyle:{title: 'Keyword
frequencies', titleTextStyle:{color: 'black', font: 'Arial', fontSize:
14}},
vAxis:{title: 'Keyword frequencies',
titleTextStyle:{color: 'black', font: 'Arial', fontSize: 14}},
hAxis:{title: 'Polling date time',
titleTextStyle:{color: 'black', font: 'Arial', fontSize: 14}}});
}

</script>

<div id = "sampleVisualisation"></div>

Which used to work until recently. So I'm puzzled as to why it doesn't
now. I'm using the version of IE9 released a few days ago, i.e.
9.0.8112.16421, and I believe this to be the actual release. And IE9
does not run in any form of compatibility mode as far as I know.

I notice that I can use the interactive samples provided in the
gallery such as the AreaChart but if I try the code provided in a web
page of my own, it fails with the message.

I suspect it is to do with versioning but any ideas?

Alexander Bautz

unread,
Mar 18, 2011, 3:33:11 AM3/18/11
to Google Visualization API
Hi,
I have the same problem using IE 9.0.812.16421.

If i hit the "Compatibility" switch, everything renders as it should.

Regards
Alexander

Mr Morgan

unread,
Mar 18, 2011, 12:26:26 PM3/18/11
to Google Visualization API
So we have a resolution, but not a solution. But this is good news.
Thanks Alex.

Jinji

unread,
Mar 22, 2011, 8:52:21 AM3/22/11
to google-visua...@googlegroups.com
For what its worth, we think the problem only occurs on IE9 when "browser mode" is "IE9" and "document mode" is something older than IE9 (such as "IE8" or "IE7"). If both are IE9, it should work.

Matthias Ernst

unread,
Mar 23, 2011, 8:25:48 AM3/23/11
to google-visua...@googlegroups.com, Jinji
Same conclusion here. A <!doctype html> solved the problem for me.


Jason G

unread,
Mar 24, 2011, 5:14:44 PM3/24/11
to Google Visualization API
I have a <!doctype> and it still doesn't work in IE 9. Did anyone
solve this problem yet?

Please post the solution.. Thanks!

Ben

unread,
Apr 14, 2011, 2:25:33 PM4/14/11
to Google Visualization API
I seem to have found a solution to this:

Adding the DOCTYPE as someone else mentioned did not fix the problem
for me. However, adding a meta tag for compatibility for IE resolved
the error:

<meta http-equiv="X-UA-Compatible" content="IE=9; IE=8; IE=7" >

Where the IE listings are the version of the browser you want to
support.

Hopefully this helps someone.
Reply all
Reply to author
Forward
0 new messages