Hi Rob,

Yeah, the gadget needs to open up some links in a new tab, but before that a
signed request must be made in order to set a flag on the application
server.

The way I was doing it was to simply call a "window.open" on the callback
for osapi.http.get, but window.open gets blocked by popup blockers and this
is a no-no for our the kind of users we are aiming for.

I then thought on putting the link to open in the href of the <a> and an
onclick event that would call this signed request and return true ONLY after
the request has finished -- because the page opened by this link needs this
flag to be set BEFORE being rendered (or it won't render at all).

It is kind of working, but sometimes the pages won't render (flag not set),
so I wanted to make sure that the function would only return after the ajax
request was completed.

I'll try to solve it using a while loop, let's see how it goes.

Thanks,

Marcelo.

On Tue, May 18, 2010 at 12:52 AM, Rob Russell <[email protected]> wrote:

> Hi Marcelo,
> I don't think that's available. There are a lot of good ways to structure
> your code so you can work asynchronously though. Is there a specific reason
> you're having trouble making your app work with asynchronous calls?
>
>
> Rob Russell
> Google Developer Relations
>
>
> On Mon, May 17, 2010 at 5:58 PM, Marcelo de Moraes Serpa <
> [email protected]> wrote:
>
>> Hello list,
>>
>> Is there a way to make Synchronous Ajax requests using the osapi.http
>> (get/post/head/put) API ? I have checked the documentation but could
>> not find any params for that.
>>
>> Thanks,
>>
>> Marcelo.
>>
>> --
>> 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]<google-gadgets-api%[email protected]>
>> .
>> For more options, visit this group at
>> http://groups.google.com/group/Google-Gadgets-API?hl=en.
>>
>>
>  --
> 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]<google-gadgets-api%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/Google-Gadgets-API?hl=en.
>

-- 
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