how can i fix this problem? in page source it is like this <?=$jsonTable?> 

On Tuesday, December 3, 2013 11:16:25 PM UTC+5, asgallant wrote:
>
> If you see <?=$jsonTable?> in the output from your server (open the page, 
> view the source, and look in your javascript), then PHP is not working on 
> your server.
>
> On Tuesday, December 3, 2013 12:31:53 PM UTC-5, Qurat Haider wrote:
>>
>> here is my code and it is working fine in my PC
>>
>> // Connect to server and select database.
>>  $con=mysql_connect("$host", "$username")or die("cannot connect");
>>  mysql_select_db("$db_name")or die("cannot select DB");
>>
>>  $data = mysql_query("select SUM(Distance) as Distance, CAST( Time AS date) 
>> as Time from gprs where DeviceId=25 and Time between '2013-08-08' and 
>> '2013-09-31' group by CAST(Time AS date) order by CAST( Time AS date)")
>>  or die(mysql_error()); 
>>
>>  $table = array();
>>  $table['cols'] = array(
>>
>>     array('label' => 'TIME', 'type' => 'string'),
>> array('label' => 'Distance', 'type' => 'number') 
>>  );
>> $rows = array();while ($nt = mysql_fetch_assoc($data))
>> {
>>
>> $temp = array();
>> $temp[] = array('v' => $nt['TIME']);
>> $temp[] = array('v' => $nt['Distance']);
>>     $rows[]['c'] = $temp;
>>  }
>>     $table['rows'] = $rows;
>>     $jsonTable = json_encode($table);
>>  ?>
>>
>>  <!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 Visualization API Sample
>>  </title>
>>  <script type="text/javascript" src="//www.google.com/jsapi"></script>
>>  <script type="text/javascript">
>>  google.load('visualization', '1', {packages: ['corechart']});
>>  </script>
>>  <script type="text/javascript">
>>  function drawVisualization() {
>>  // Create and populate the data table.
>>  var data = new google.visualization.DataTable(<?=$jsonTable?>);
>>
>>  // Create and draw the visualization.
>>  new 
>> google.visualization.ColumnChart(document.getElementById('visualization')).
>>     draw(data);
>>   }
>>
>>   google.setOnLoadCallback(drawVisualization);  
>>  </script>
>>  </head>
>>  <body style="font-family: Arial;border: 0 none;">
>>  <div id="visualization" style="width: 600px; height: 300px;"></div>
>>  </body>
>>  </html>
>>
>>
>> i am using Xampp server on my PC and when i uploaded the file on server 
>> it is not displaying chart. i am using Wamp server on my remote server. 
>> crtl+shift+j shows the error on 
>>
>> var data = new google.visualization.DataTable(<?=$jsonTable?>); 
>>
>> error is unexpected parameter. i don't know what to do please tell me 
>> what is the problem
>>
>> On Tuesday, December 3, 2013 9:23:33 PM UTC+5, Jeremy Faller wrote:
>>
>>
>> Can you please post the following:
>>>
>>>    - Your code, or anything about your code you can share.
>>>    - Information about your browser, eg, OS, version, and output of the 
>>>    web browser's console. Are you getting error messages?
>>>    - What have you tried?
>>>
>>>
>>> On Tuesday, December 3, 2013 9:10:29 AM UTC-5, Qurat Haider wrote:
>>>>
>>>> i am using Google charts for my data and it is displaying properly in 
>>>> my system but when i upload the file on the server my all Google charts, 
>>>> Google table is disappeared. No error is shown just empty page. What can i 
>>>> do? only Google map is displaying. Please tell me how to solve this 
>>>> problem?
>>>>
>>>

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