Using JSONP
Simpliest way - you can use jquery javascript library on client side,
and on server - you will receive name of the javascript callback
function (you can create and pass it by yourself, but simplier - jusst
receive it).
After that, you should make json from your results and insert it into
callback. Result will be something like that:
callback_function_name({ .... your json here .... })
It will works and it is a proper way to workaround of the same origin
domain policy.
On Wed, Jun 23, 2010 at 7:50 PM, Anshul Gupta <[email protected]> wrote:
> Thanks Victor.
>
> Can I read data from an external website?? This website may be hosted
> somewhere else and might be storing data in Sql server 2005
>
>
> On Jun 11, 9:34 pm, Victor Kuriashkin <[email protected]> wrote:
>> Sure you can.
>>
>> But you shuld know, that opensocial containers cache you gadget, so,
>> you will not be able to generate a gadget on your server
>> with data inside it. Solution is JSONP request.
>>
>> On Fri, Jun 11, 2010 at 12:58 PM, Anshul Gupta
>>
>> <[email protected]> wrote:
>> > Hi All,
>>
>> > Can I write a gadget which fetches data from one of my databases?
>>
>> > Any help in this regard will be greatly appreciated.
>>
>> > Thanks
>>
>> > --
>> > 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
>> > athttp://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.
>
>
--
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.