Hi,
"output" is neither a javascript instruction nor a defined function.
Look at the example you mention, the output referred in the comment is
done at the next line assigning document.getElementById
( 'content_div' ).innerHTML.
On Nov 14, 2:48 pm, GoaKoala <[EMAIL PROTECTED]> wrote:
> Hello;
>
> I am a newbie gadget developer. I am currently trying to write my
> first gadget. I want to get data from an asp page for test purposes. I
> write the gadget using gge. And here is the code.
>
> <?xml version="1.0" encoding="UTF-8" ?>
> <Module>
> <ModulePrefs title="Post Test" >
> </ModulePrefs>
> <Content type="html">
> <![CDATA[
> <script type="text/javascript">
> function makePOSTRequest(url, postdata)
> {
> var params = {};
> postdata = gadgets.io.encodeValues(postdata);
> params[gadgets.io.RequestParameters.METHOD] =
> gadgets.io.MethodType.POST;
> params[gadgets.io.RequestParameters.POST_DATA]= postdata;
> gadgets.io.makeRequest(url, response, params);
>
> };
>
> function response(obj)
> {
> output(obj.text);
> document.getElementById( 'content_div' ).innerHTML = obj.text;
>
> };
>
> var data = { data1 : "test", data2 : 123456 };
>
> makePOSTRequest("http://xxx.xxx.xxx.xxx/gadget/test", data);
> </script>
> <div id="content_div"></div> ]]>
> </Content>
> </Module>
>
> It's a really simple gadget that would print out the contents of the
> page. I got the function that makes the request from official google
> page.
> (http://code.google.com/apis/gadgets/docs/remote-content.html#methods-...
> )
>
> But when i add this gadget to my igoogle page and refresh the page i
> get the error
>
> Message: 'gadgets.io' is null or not an object
> Line: 9
> Char: 1
> Code: 0
> URI:http://12.gmodules.com/ig/ifr?url=http://hosting.gmodules.com/ig/gadg...
>
> I think i am making a really simple mistake but cannot figure it out.
> Can somebody please point me out my mistake.
>
> Thanks in advance.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"iGoogle Developer Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/Google-Gadgets-API?hl=en
-~----------~----~----~----~------~----~------~--~---