MySpace Open Platform

A Place For Developers

Welcome Developers!

in

Welcome!

in

Exception, always acts like an anonymous call?

Last post 10-09-2009 7:00 AM by Mahesh. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 09-03-2008 2:08 AM

    Exception, always acts like an anonymous call?

     Hi All,

    Trying to make a call to my app hosted in an external iframe.  When I first load the app, it works fine.  However, when I try to update  div on my page, I do a makerequest like so:

            myParams = {};
            myParams[gadgets.io.RequestParameters.METHOD] = gadgets.io.MethodType.POST;
            myParams[gadgets.io.RequestParameters.POST_DATA] = '';
            myParams[gadgets.io.RequestParameters.AUTHORIZATION] = gadgets.io.AuthorizationType.NONE;
            myParams[gadgets.io.RequestParameters.CONTENT_TYPE] = gadgets.io.ContentType.TEXT;     
            myReturn = gadgets.io.makeRequest(url, myCallBack(), myParams);

     

    With IE6, I get the popup error window that says object is expected.   

    In every case, using firefox 3.0.1, I get the following exception: 

     [Exception... "Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) [nsIXMLHttpRequest.open]" nsresult: "0x80070057 (NS_ERROR_ILLEGAL_VALUE)" location: "JS frame :: http://ip98-165-137-145.ph.ph.cox.net/phpOSTest/JavaScript/gadgets001.js :: anonymous :: line 352" data: no]


    I tried this with many different parameters and even different urls, all pointing to my external domain.  Is this a common problem?  If it is, what do I need to do to get this thing to let me update a page?

    If it's not a common problem, then what do I need to do to get this thing to let me update a page?

    Any help is appreciated.

  • 10-09-2009 7:00 AM In reply to

    • Mahesh
    • Not Ranked
    • Joined on 10-05-2009
    • Posts 5

    Re: Exception, always acts like an anonymous call?

    DenDude:
    myReturn = gadgets.io.makeRequest(url, myCallBack(), myParams);
    I suppose you've already sorted out this problem, but in case you haven't, the problem is with your Javascript code: the above line should be myReturn = gadgets.io.makeRequest(url, myCallBack, myParams); Your original line would take the output of your function (myCallBack) and treat it as a function pointer (which it probably isn't).
Page 1 of 1 (2 items)