Wednesday, 15 June 2011

python - JQuery Load function returns 405 Method not Allowed -



python - JQuery Load function returns 405 Method not Allowed -

i dealing web app based on google app engine (python). trying update div polymer (html) element. div need update element's container. end, element's javascript snippet trying div object through jquery , invoking load method like

$('#mycontainerid').load('/myqueryurl?id=123123123');

the problem 405 method not allowed

update

the url bound python webapp.requesthandler through app's yaml file implements method, makes query ndb , render jinja2 template.

update 2

the error in consol log, when expanded, says:

k.cors.a.crossdomain.send n.extend.ajax n.fn.load (anonymous function) j k.firewith x (anonymous function)

it says there cross domain although domains same

use $.ajax() instead of $.load() command request/response explicitly. may trick (you may need adjust params):

$('#mycontainerid').ajax({ crossdomain: false, type: "post", // || || set || delete url: '/myqueryurl?id=123123123' });

jquery python google-app-engine polymer

No comments:

Post a Comment