Re: [OpenSocial] API to get the URL of my gadget

0 views
Skip to first unread message

Paul Lindner

unread,
Dec 17, 2009, 6:35:30 PM12/17/09
to opensoc...@googlegroups.com, opensocial-an...@googlegroups.com
You can get it from the iframe URL via gadgets.util.getUrlParameters().url

It would be nice if hangman substitution worked for this, then one could write:

  <base href="__GADGET_URL__" /> etc..

This then solves the relative path problem for gadgets..


On Tue, Dec 15, 2009 at 10:27 AM, Randy Hudson <randy....@gmail.com> wrote:
I have a gadget which calls services on the server on which it is
hosted.  This gadget and those services exist on multiple server
installations.  When my gadget invokes the services using makeRequest,
it needs to build the URL for the service relative to the URL of
itself.

So, is there some javascript API for the gadget to figure out where it
came from (rather than where it's being rendered)? Thanks in advance.

--

You received this message because you are subscribed to the Google Groups "OpenSocial Application Development" group.
To post to this group, send email to opensoc...@googlegroups.com.
To unsubscribe from this group, send email to opensocial-ap...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/opensocial-api?hl=en.



Reply all
Reply to author
Forward
0 new messages