*parentPage.jsp*

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE>
<html>
    <head>
        <script 
src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js";></script>
        <script type="text/javascript" 
src="https://www.google.com/jsapi";></script>
        <script type="text/javascript">
            google.load("visualization", "1", {packages: ["corechart"]});
            google.setOnLoadCallback(drawChart);
            var year = 2008;
            var chartDatas = [
                ['Year', 'Sales', 'Expenses'],
                ['2004', 1000, 400],
                ['2005', 1170, 460],
                ['2006', 660, 1120],
                ['2007', 1030, 540]
            ];
            function drawChart() {
                var data = 
google.visualization.arrayToDataTable(chartDatas);

                var options = {
                    title: 'Company Performance',
                    vAxis: {title: 'Year', titleTextStyle: {color: 'red'}}
                };

                var chart = new 
google.visualization.BarChart(document.getElementById('chart_div'));
                chart.draw(data, options);
            }
            function callChild() {
                $.ajax({
                    url: "childJsp.jsp",
                    complete: function(res, textStatus) {
                        $('#childPage').html(res.responseText);             
           
                    }
                });
            }
        </script>
    </head>
    <body>
        <div id="chart_div" style="width: 900px; height: 500px;"></div>
        <br>
        <input type="button" onclick="callChild();" value="call child page">
        <div id="childPage"> </div>
    </body>
</html>


*childJsp.jsp*

<script>       
    chartDatas.push([''+(year++), 900, 400]);
    drawChart();
</script>


*screen shots:*

<https://lh3.googleusercontent.com/-JLlJu8IyR9I/U4DVjg4sXbI/AAAAAAAAIGo/byJxrgsJoho/s1600/scrnshot_1.png>


<https://lh5.googleusercontent.com/-8nUyvTyQ9RY/U4DVdpXKCMI/AAAAAAAAIGc/TDwj7TsMiE0/s1600/scrnshot_2.png>

my same question : 
http://stackoverflow.com/questions/23847754/google-chart-issue-in-ie8-script70-permission-denied-formaten-defaulten-ui

-- 
You received this message because you are subscribed to the Google Groups 
"Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/d/optout.

Reply via email to