6 entrypoint : "$entrypoint",
8 widgetid: "$widget_id",
11 getXHRObj : function(){
12 if (window.XMLHttpRequest) {
13 // code for IE7+, Firefox, Chrome, Opera, Safari
14 this.xmlhttp = new XMLHttpRequest();
17 this.xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
21 dorequest : function(args, cb) {
22 if (args===null) args = new Array();
24 args['s']=window.location;
25 var urlencodedargs = new Array();
26 for(k in args){ urlencodedargs.push( encodeURIComponent(k)+"="+encodeURIComponent(args[k]) ); }
28 var url = this.entrypoint + "?"+ urlencodedargs.join("&");
30 this.xmlhttp.open("GET", url ,true);
32 this.xmlhttp.onreadystatechange=function(){
33 if (this.readyState==4){
34 if (this.status==200) {
35 cb(this.responseText);
37 document.getElementById(f9a_widget.widgetid).innerHTML="Error loading widget.";
44 requestcb: function(responseText) {
45 document.getElementById(f9a_widget.widgetid).innerHTML=responseText;
50 this.dorequest(null, this.requestcb);
59 document.writeln("<div id='$widget_id' class='f9k_widget'>");
60 document.writeln("<img id='$widget_id_ld' src='$loader'>");
61 document.writeln("</div>");