MySpace Open Platform

A Place For Developers

Welcome Developers!

in

Welcome!

in

returned null from gadgets.io.makeRequest().

Last post 03-22-2009 12:34 PM by Nate. 0 replies.
Page 1 of 1 (1 items)
Sort Posts: Previous Next
  • 03-22-2009 12:34 PM

    • Nate
    • Top 500 Contributor
    • Joined on 09-21-2008
    • Posts 11

    returned null from gadgets.io.makeRequest().

    This happens occasionally when  i run the app in IE or safari ect, but happens always when run in Firefox. I get no javascript errors, just a null response. Can others using the gadgets.io.makeRequest() method please post if they have similar problems - and if not, how did you get it to work properly?

    My code is :

    function rqSender(postdata){
      bkpPostdata=postdata;
      var params = {};
      params[gadgets.io.RequestParameters.METHOD] = gadgets.io.MethodType.POST;
      params[gadgets.io.RequestParameters.POST_DATA] = gadgets.io.encodeValues(postdata);
      params[gadgets.io.RequestParameters.AUTHORIZATION] = gadgets.io.AuthorizationType.SIGNED;
      gadgets.io.makeRequest(url, response, params);
    }

    function response(obj) {
      var str = obj.text;
      document.getElementById("AppBody").innerHTML = str;
    }

    The postdata variable is an array filled with the form fields and values. when the request fails i check bkpPostdata and it is always filled due to the fact that postdata is validated before submission in another method. When it fails, i also check the logs on my server and there is no record of an incoming POSTwhich means it is failing without sending anything to my server.

    Help is really appreciate, and needed asap.

    Thanks

Page 1 of 1 (1 items)