I am using visual basic, javascript, and html.

I am trying to use google hierarchy chart api. I works fine on localhost but when I try to move the same code to the server than I get the following error:

Error: Object doesn't support this action

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="myFile.aspx.vb" Inherits="UI_myFile" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
        google.charts.load('current', { packages: ["orgchart"] });

        function getQueryVariable(variable) {
            var query = window.location.search.substring(1);
            var vars = query.split("&");
            for (var i = 0; i < vars.length; i++) {
                var pair = vars[i].split("=");
                if (pair[0] == variable) {
                    return pair[1];

        function drawChart() {
            var data = new google.visualization.DataTable();
            data.addColumn('string', 'Name');
            data.addColumn('string', 'Title');

            if (getQueryVariable("urlVar") == "test") {
                [{ v: 'test1', f: 'test1<div>test1</div>' }, ''],
                [{ v: 'test2', f: 'test2<div>test2</div>' }, 'test1']

            var chart = new google.visualization.OrgChart(document.getElementById('chart_div'));
            chart.draw(data, { allowHtml: true });

    <form id="form1" runat="server">
        <div id="chart_div"></div>

was able to fix the issue by

<meta http-equiv="X-UA-Compatible" content="IE=11,chrome=1">

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.