You need to load jQuery if you want to use the jQuery AJAX function.  Add 
this script tag before your javascript:

<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js" 
></script>

then reload the page and see if that fixes it for you.

On Monday, August 12, 2013 11:25:36 PM UTC-4, mizzle lee wrote:
>
> data cannot read. the page is blank but not show any error. i think is my 
> json problem. below is my coding
>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "
> http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";> 
> <html xmlns="http://www.w3.org/1999/xhtml";> 
>   <head> 
>     <meta http-equiv="content-type" content="text/html; charset=utf-8"/> 
>     <title> 
>       Google Chart API
>     </title> 
>     <script type="text/javascript" src="http://www.google.com/jsapi
> "></script> 
>     <script type="text/javascript"> 
>       google.load('visualization', '1', {packages: ['charteditor']});
>     </script> 
>     <script type="text/javascript"> 
>     var wrapper;
>     function init() {
> var data = $.ajax({
>           url: "json.php",
>           dataType:"json",
>           async: false
>           }).responseText;
>
> var data = new google.visualization.DataTable(data);
>       wrapper = new google.visualization.ChartWrapper({
>         dataTable: data,   
>         containerId: 'visualization',
>         chartType: 'LineChart'
>       });
>       wrapper.draw();
>     }
>
>     function openEditor() {
>       var editor = new google.visualization.ChartEditor();
>       google.visualization.events.addListener(editor, 'ok',
>         function() {
>           wrapper = editor.getChartWrapper();  
>           wrapper.draw(document.getElementById('visualization'));
>       });
>       editor.openDialog(wrapper);
>     }
>     google.setOnLoadCallback(init);
>     
>     </script> 
>   </head> 
>   <body style="font-family: Arial;border: 0 none;"> 
>     <input type='button' onclick='openEditor()' value='Open Editor'> 
>     <div id='visualization' style="width:600px;height:400px"> 
>   </body> 
> </html> 
>
> asgallant於 2013年8月13日星期二UTC+8上午11時21分17秒寫道:
>>
>> What is your problem?
>>
>> On Monday, August 12, 2013 11:01:22 PM UTC-4, mizzle lee wrote:
>>>
>>> i have facing some problem when i create a chart editor with using json,
>>> but i dunno where is the problem.
>>> hope get help.
>>>
>>>

-- 
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/groups/opt_out.


Reply via email to