Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
OPTIONS http://www.google.com/jsapi 405 (Method Not Allowed) error
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  22 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
sam  
View profile  
 More options Nov 12 2012, 5:22 pm
From: sam <quiteneighb...@gmail.com>
Date: Mon, 12 Nov 2012 14:22:37 -0800 (PST)
Local: Mon, Nov 12 2012 5:22 pm
Subject: OPTIONS http://www.google.com/jsapi 405 (Method Not Allowed) error

Hi,
     I am using mysql/php to create json data, in addition have test.html
that read json and draws annotated timeline,

   keep getting  "OPTIONS http://www.google.com/jsapi 405 (Method Not
Allowed)"  error

  "XMLHttpRequest cannot load http://www.google.com/jsapi. Origin
http://nova.it.rit.edu is not allowed by Access-Control-Allow-Origin."

need urgent help, I am using xampp

thanks


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
asgallant  
View profile  
 More options Nov 12 2012, 5:50 pm
From: asgallant <drew_gall...@abtassoc.com>
Date: Mon, 12 Nov 2012 14:50:49 -0800 (PST)
Local: Mon, Nov 12 2012 5:50 pm
Subject: Re: OPTIONS http://www.google.com/jsapi 405 (Method Not Allowed) error

Can you post your source code?

Since you're using xampp, I assume you're accessing the HTML file through
the webserver rather than locally, but if you're not, then this could be a
Flash security issue (see the Notes<https://developers.google.com/chart/interactive/docs/gallery/annotate...>section in the ATL documentation for details).


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
sam  
View profile  
 More options Nov 12 2012, 6:01 pm
From: sam <quiteneighb...@gmail.com>
Date: Mon, 12 Nov 2012 15:01:37 -0800 (PST)
Local: Mon, Nov 12 2012 6:01 pm
Subject: Re: OPTIONS http://www.google.com/jsapi 405 (Method Not Allowed) error

thanks for reply asgallant, I built everything by reading all your previous
comments history,  I was testing everything locally on my laptop using
xampp got the 405 error, moved everything to my school provided space on
.edu, same error.
all your previous comments on other threads are really helpful.

my .php  file output sample, it's really big file, just showed a few lines,
 from  echo json_encode($output);
[["Date(2012,04,12,12,50,02)","15662","5589","7999","2074","1488","425"],[" Date(2012,04,12,1,00,03)","15662","5589","7999","2074","1488","425"],["Date (2012,04,12,1,10,02)","15242","5555","7603","2084","1430","413"]]

.html file :

<html>
  <head>
    <script type='text/javascript' src='http://www.google.com/jsapi
'></script>
<script type="text/javascript" src="jquery.min.js"></script>
    <script type='text/javascript'>
      google.load('visualization', '1', {'packages':['annotatedtimeline']});
      google.setOnLoadCallback(drawChart);

 function drawChart() {
        var data = new google.visualization.DataTable();
       data.addColumn('datetime', 'Date');
data.addColumn('number', 'n1');
data.addColumn('number', 'n2');
data.addColumn('number', 'n3');
data.addColumn('number', 'n4');
data.addColumn('number', 'n5');
data.addColumn('number', 'n6');
 var now = new Date();

        var chart = new
google.visualization.AnnotatedTimeLine(document.getElementById('chart_div') );
 function updateData () {
$.ajax({
url: 'http://localhost/db_chartjson.php',
dataType: 'json',
type: 'POST',
crossDomain: true,
success: function (json) {
data.removeRows(0, data.getNumberOfRows());
data.addRows(json);
chart.draw(data,{width: 400, height: 240});
 // refresh data in 1 minute
setTimeout(function () {
updateData();

}, 60000);
}

 });
         }
 }

    </script>
   </head>
  <body>
    <div id='chart_div' ></div>
  </body>
</html>


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
asgallant  
View profile  
 More options Nov 12 2012, 6:46 pm
From: asgallant <drew_gall...@abtassoc.com>
Date: Mon, 12 Nov 2012 15:46:31 -0800 (PST)
Local: Mon, Nov 12 2012 6:46 pm
Subject: Re: OPTIONS http://www.google.com/jsapi 405 (Method Not Allowed) error

Hmmm...I don't see anything wrong with the code, can you post a link to the
live version on your school's server?

Incidentally, the data in the JSON won't work.  Your numbers have to be
unquoted, and the dates won't work as is.  That date format is correct if
you are using the JSON implementation of a DataTable, but not for using the
addRows method.  Given how you are fetching the data, you'll either have to
process it in javascript before passing it to addRows, or change the data
structure to use the full DataTable JSON structure.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
sam  
View profile  
 More options Nov 12 2012, 7:12 pm
From: sam <quiteneighb...@gmail.com>
Date: Mon, 12 Nov 2012 16:12:36 -0800 (PST)
Local: Mon, Nov 12 2012 7:12 pm
Subject: Re: OPTIONS http://www.google.com/jsapi 405 (Method Not Allowed) error

I was suspicious about double quotes around numbers but not date in my
json, thats how my json_encode spits out array. what is JSON implementation
of DataTable?

even if I send you the link it wont work outside school network due to
security reasons, I am vpning in to school myself.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
sam  
View profile  
 More options Nov 12 2012, 7:32 pm
From: sam <quiteneighb...@gmail.com>
Date: Mon, 12 Nov 2012 16:32:06 -0800 (PST)
Local: Mon, Nov 12 2012 7:32 pm
Subject: Re: OPTIONS http://www.google.com/jsapi 405 (Method Not Allowed) error

are you talking about sampleData.json format?

same as in this example ?
https://developers.google.com/chart/interactive/docs/php_example


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
asgallant  
View profile  
 More options Nov 12 2012, 7:41 pm
From: asgallant <drew_gall...@abtassoc.com>
Date: Mon, 12 Nov 2012 16:41:01 -0800 (PST)
Local: Mon, Nov 12 2012 7:41 pm
Subject: Re: OPTIONS http://www.google.com/jsapi 405 (Method Not Allowed) error

Yes, that's the format you need.  Here's a basic bit of PHP code that shows
how to build it:
https://groups.google.com/d/msg/google-visualization-api/GK0zwNbIwUo/...


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
sam  
View profile  
 More options Nov 12 2012, 8:22 pm
From: sam <quiteneighb...@gmail.com>
Date: Mon, 12 Nov 2012 17:22:17 -0800 (PST)
Local: Mon, Nov 12 2012 8:22 pm
Subject: Re: OPTIONS http://www.google.com/jsapi 405 (Method Not Allowed) error

in this  particular cod snippet, where did $i come from?

$sth = mysql_query("SELECT * FROM testpower WHERE datetime > 0");
$rows = array();
$flag = true;

$table = array();

$table['cols'] = array(

    array('label' => 'date', 'type' => 'datetime'),

    array('label' => 'power', 'type' => 'number')

);

$rows = array();
while($r = mysql_fetch_assoc($sth)) {
    $temp = array();

$temp[] = array('v' => $i['datetime']); // you will probably need to
transform this into the Date object format
$temp[] = array('v' => (float) $i['power']); // typecast to int, float,
whatever - if you don't, it will be interpreted as a string

    $rows[] = array('c' => $temp);

}

$table['rows'] = $rows;

$jsonTable = json_encode($table);


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
asgallant  
View profile  
 More options Nov 12 2012, 8:34 pm
From: asgallant <drew_gall...@abtassoc.com>
Date: Mon, 12 Nov 2012 17:34:35 -0800 (PST)
Local: Mon, Nov 12 2012 8:34 pm
Subject: Re: OPTIONS http://www.google.com/jsapi 405 (Method Not Allowed) error

Sorry, that's a typo, should have been $r.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
sam  
View profile  
 More options Nov 12 2012, 10:16 pm
From: sam <quiteneighb...@gmail.com>
Date: Mon, 12 Nov 2012 19:16:20 -0800 (PST)
Local: Mon, Nov 12 2012 10:16 pm
Subject: Re: OPTIONS http://www.google.com/jsapi 405 (Method Not Allowed) error

I did update my .php file according to code you provided, and get jason in
proper format,

commented out addColumn in .html   still no luck


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
asgallant  
View profile  
 More options Nov 13 2012, 4:06 am
From: asgallant <drew_gall...@abtassoc.com>
Date: Tue, 13 Nov 2012 01:06:53 -0800 (PST)
Local: Tues, Nov 13 2012 4:06 am
Subject: Re: OPTIONS http://www.google.com/jsapi 405 (Method Not Allowed) error

To debug the json, add colsole.log(json); in the AJAX query, and then check
the developer's console in Chrome/Firefox to see what comes out.  Make sure
that you are using the json to create a new DataTable and not with the
addRows method; it should be var data = new
google.visualization.DataTable(json); in the success callback.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
sam  
View profile  
 More options Nov 14 2012, 4:22 am
From: sam <quiteneighb...@gmail.com>
Date: Wed, 14 Nov 2012 01:22:15 -0800 (PST)
Local: Wed, Nov 14 2012 4:22 am
Subject: Re: OPTIONS http://www.google.com/jsapi 405 (Method Not Allowed) error

attached json output I get,  can you check it?  I am pretty sure it's
correct though.
thanks

  jsonOutput.txt
4844K Download

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
asgallant  
View profile  
 More options Nov 14 2012, 9:56 am
From: asgallant <drew_gall...@abtassoc.com>
Date: Wed, 14 Nov 2012 06:56:46 -0800 (PST)
Local: Wed, Nov 14 2012 9:56 am
Subject: Re: OPTIONS http://www.google.com/jsapi 405 (Method Not Allowed) error

You changed your date format, what you had before was correct for using the
JSON data table representation.  Other than that, your data seems to be in
the correct format (see example with a truncated set of your data and fixed
dates here: http://jsfiddle.net/asgallant/2nFWK/).  Fix the dates and test
again.  If it still doesn't work, then post your js code and I'll take a
look at that.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
sam  
View profile  
 More options Nov 14 2012, 9:05 pm
From: sam <quiteneighb...@gmail.com>
Date: Wed, 14 Nov 2012 18:05:24 -0800 (PST)
Local: Wed, Nov 14 2012 9:05 pm
Subject: Re: OPTIONS http://www.google.com/jsapi 405 (Method Not Allowed) error

my bad, completely missed date format, fixed it, still no luck, please see
my js attached,

thanks again

  parsetest.html
1K Download

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
asgallant  
View profile  
 More options Nov 14 2012, 11:09 pm
From: asgallant <drew_gall...@abtassoc.com>
Date: Wed, 14 Nov 2012 20:09:57 -0800 (PST)
Local: Wed, Nov 14 2012 11:09 pm
Subject: Re: OPTIONS http://www.google.com/jsapi 405 (Method Not Allowed) error

Off the top, I see your chart div's style isn't formatted correctly:

<div id="chart_div" style="width: 800; height: 600"></div>

should be:

<div id="chart_div" style="width: 800px; height: 600px"></div>

Setting height and width in the ATL chart's options doesn't do anything.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
sam  
View profile  
 More options Nov 15 2012, 7:50 pm
From: sam <quiteneighb...@gmail.com>
Date: Thu, 15 Nov 2012 16:50:37 -0800 (PST)
Local: Thurs, Nov 15 2012 7:50 pm
Subject: Re: OPTIONS http://www.google.com/jsapi 405 (Method Not Allowed) error

that doesn't really fix the issue


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
asgallant  
View profile  
 More options Nov 15 2012, 10:31 pm
From: asgallant <drew_gall...@abtassoc.com>
Date: Thu, 15 Nov 2012 19:31:16 -0800 (PST)
Local: Thurs, Nov 15 2012 10:31 pm
Subject: Re: OPTIONS http://www.google.com/jsapi 405 (Method Not Allowed) error

Open the page in Chrome, and look at the developer's console (hit
ctrl+shift+j to open) - what error message(s) is it throwing?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
asgallant  
View profile  
 More options Nov 15 2012, 10:34 pm
From: asgallant <drew_gall...@abtassoc.com>
Date: Thu, 15 Nov 2012 19:34:20 -0800 (PST)
Local: Thurs, Nov 15 2012 10:34 pm
Subject: Re: OPTIONS http://www.google.com/jsapi 405 (Method Not Allowed) error

Also, why do you have "crossdomain: true" in the AJAX?  Isn't the HTML page
being served from the same server as your data?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
sam  
View profile  
 More options Nov 16 2012, 12:03 am
From: sam <quiteneighb...@gmail.com>
Date: Thu, 15 Nov 2012 21:03:37 -0800 (PST)
Local: Fri, Nov 16 2012 12:03 am
Subject: Re: OPTIONS http://www.google.com/jsapi 405 (Method Not Allowed) error

I made it work, now  chart flickers every time it updates


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
asgallant  
View profile  
 More options Nov 16 2012, 1:20 am
From: asgallant <drew_gall...@abtassoc.com>
Date: Thu, 15 Nov 2012 22:20:50 -0800 (PST)
Local: Fri, Nov 16 2012 1:20 am
Subject: Re: OPTIONS http://www.google.com/jsapi 405 (Method Not Allowed) error

There is an option that helps with the flickering, but you can't always use
it.  See "allowRedraw" in the ATL options<https://developers.google.com/chart/interactive/docs/gallery/annotate...>.
 Note this only applies to ATL charts, if you use the regular charts, there
is no flickering.  If this presents a problem, there is an alternative to
ATL charts which involves using LineCharts<https://developers.google.com/chart/interactive/docs/gallery/linechart>with "annotation" and "annotationText" column
roles<https://developers.google.com/chart/interactive/docs/roles#annotation...>in combination with a
ChartRangeFilter<https://developers.google.com/chart/interactive/docs/gallery/controls...>.
 This combo provides 95% of the functionality with all the other goodies
that the regular charts provide and without the problems of Flash.

...

read more »


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
sam  
View profile  
 More options Nov 16 2012, 1:33 am
From: sam <quiteneighb...@gmail.com>
Date: Thu, 15 Nov 2012 22:33:50 -0800 (PST)
Local: Fri, Nov 16 2012 1:33 am
Subject: Re: OPTIONS http://www.google.com/jsapi 405 (Method Not Allowed) error

thanks again for your help man, will try to fix it now.

...

read more »


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
asgallant  
View profile  
 More options Nov 16 2012, 2:40 am
From: asgallant <drew_gall...@abtassoc.com>
Date: Thu, 15 Nov 2012 23:40:09 -0800 (PST)
Local: Fri, Nov 16 2012 2:40 am
Subject: Re: OPTIONS http://www.google.com/jsapi 405 (Method Not Allowed) error

You're welcome.

...

read more »


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »