Posted By

sircambridge on 10/27/08


Tagged

jsonjavascriptjsonHandler


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

nreliu


jsonHandler


 / Published in: Other
 

  1. var jsonHandler = makeClass({
  2. initialize: function(o) {
  3. // window.funcArray=[];
  4. this.funcI=0;
  5. this.o = extendObj({
  6. callbackKey:'_callback',
  7. funcPrefix:'jsonHandle'
  8. },o||{});
  9. },
  10. json : function(url,callbackFunc) {
  11. this.funcI++;
  12. var name = this.o.funcPrefix+this.funcI;
  13. window[name]=callbackFunc;
  14. appendScript(url+'&'+this.o.callbackKey+'='+name);
  15. }
  16. });

Report this snippet  

You need to login to post a comment.