Hi Minott,

Unfortunately, the GGE doesn't support the newer version of the API,
so while you can feel free to continue editing gadgets in it, the
preview mode will not work correctly. However, if you save the file in
GGE, you can add the gadget in the sandbox to test it using the URL
provided. If you'd like to test snippets of JavaScript, I'd recommend
installing DAfOS: http://dafos.appspot.com/. It's not quite as
efficient as GGE, but it supports the new API.

Best,
Dan

On Sep 10, 7:31 pm, Minott <[EMAIL PROTECTED]> wrote:
> Dan,
> Thanks for the quick reply, but I still seem to be having the issue. I
> am using the Google Gadget Editor to test my code in the sandbox. Do
> you think that may be causing the problem? My code is attempting to do
> a POST to a google app I’m working on. After I hit preview on the
> editor and attempt to do a post, I get a JavaScript error message
> saying “gadgets.io is undefined”. Here is the code I am using to
> attempt the post:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <Module>
> <ModulePrefs title="hello world example" >
> <Require feature="opensocial-0.7"/>
> </ModulePrefs>
>
> <Content type="html"><![CDATA[
>
> <script type="text/javascript">
> function makeRequest(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) {
> document.getElementById("testing").innerHTML=obj.text;
>
> }
>
> function posting(my_action)
> {
> var info = {
> data : '[{"task_name":"test2","details":"","priority":"4","repeating":
> 0,"recurrence":"every_day","state":"missed_state","hours_warning":
> 24,"completion_time":1213137000000,"warning_time":
> 1213050600000,"critical_time":1213115400000},
> {"task_name":"test","details":"test","priority":"4","repeating":
> 1,"recurrence":"every_month","state":"good_state","hours_warning":
> 24,"completion_time":1213914600000,"warning_time":
> 1213828200000,"critical_time":1213893000000}]',
> user_id :'ahNwcmlvcml0aXplZHRhc2tsaXN0cg8LEglUYXNrX0xpc3QYFgw',
> action : my_action
>
> }
>
> makeRequest("http://prioritizedtasklist.appspot.com";, info);
>
> }
>
> </script>
> <button onClick='posting("print_data")'>Print Data</button>
> <button onClick='posting("update_data")'>Update Data</button>
> <button onClick='posting("create_list")'>Update Data</button>
> <div id='testing'></div>
>
> ]]></Content>
> </Module>
>
> If I get this going I can finally put all the pieces together and
> finish it. Your help is much appreciated.
> Thanks,
> Minott
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to