views:

9

answers:

1

I've seen solutions like

top.document.getElementById('iframe_a').src

But the problem is, that I don't know the Iframes ID. My Application is running as a Gmail-Gadget and therefore I don't know which ID Google will generate.

So how can I get the URL of my gadget?

Using JQuery will also be fine.

+1  A: 

If your script is executed within an iframe, location.href should do it. You might want to access the location object in more detail tho.

jAndy
Oh.. yes that actually did the trick. I thought location.href would give me the url of the location bar. Thanks!
JochenJung