Fix widgets crosssite ajax, make like widget works

This commit is contained in:
Fabio Comuni 2011-10-18 17:18:58 +02:00
parent 056921b1e8
commit 255685c176
5 changed files with 68 additions and 20 deletions

View file

@ -22,11 +22,13 @@ var f9a_widget_$widget_id = {
dorequest : function(args, cb) {
if (args===null) args = new Array();
args['k']=this.key;
args['s']=window.location;
args['s']=window.location.href;
args['a']=this.argstr;
var urlencodedargs = new Array();
for(k in args){ urlencodedargs.push( encodeURIComponent(k)+"="+encodeURIComponent(args[k]) ); }
for(k in args){
if (typeof args[k] != 'function')
urlencodedargs.push( encodeURIComponent(k)+"="+encodeURIComponent(args[k]) );
}
var url = this.entrypoint + "?"+ urlencodedargs.join("&");
this.xmlhttp.open("GET", url ,true);