# getURL coding

**URL:** <https://forum.kirupa.com/t/geturl-coding/205024>\
**Category:** flash\
**Created:** [October 25, 2006, 1:45pm UTC](https://forum.kirupa.com/t/geturl-coding/205024 "2006-10-25T13:45:09Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![kerwint](https://avatars.discourse-cdn.com/v4/letter/k/7ab992/32.png) [@kerwint](https://forum.kirupa.com/u/kerwint)\
**Post date:** [October 25, 2006, 1:45pm UTC](https://forum.kirupa.com/t/geturl-coding/205024/1 "2006-10-25T13:45:09Z")

</div>

Hi,

i’ve found this code \*getURL(‘javascript:document.getElementById(“object\_id”).setVariable(“url\_string”,window.location.href); void (0);’); \*on other site to get the url of the current .html file. Placed inside flash but nothing happen. Was wondering if i need to put something else in the .html coding?

Thanks. :glasses:

---

<div class="post-metadata">

**Author:** ![fasterthanlight](https://avatars.discourse-cdn.com/v4/letter/f/ecc23a/32.png) [@fasterthanlight](https://forum.kirupa.com/u/fasterthanlight)\
**Post date:** [October 25, 2006, 2:27pm UTC](https://forum.kirupa.com/t/geturl-coding/205024/2 "2006-10-25T14:27:45Z")

</div>

you _do_ know there is a space in “href” in your code right?

---

<div class="post-metadata">

**Author:** ![kerwint](https://avatars.discourse-cdn.com/v4/letter/k/7ab992/32.png) [@kerwint](https://forum.kirupa.com/u/kerwint)\
**Post date:** [October 25, 2006, 3:37pm UTC](https://forum.kirupa.com/t/geturl-coding/205024/3 "2006-10-25T15:37:56Z")

</div>

> [@fasterthanlight™;1985190](#):
>
> you _do_ know there is a space in “href” in your code right?

Yup…but the coding still doesn’t work, even without that space. :jail:

---

<div class="post-metadata">

**Author:** ![bleedmedia](https://avatars.discourse-cdn.com/v4/letter/b/bcef8e/32.png) [@bleedmedia](https://forum.kirupa.com/u/bleedmedia)\
**Post date:** [October 25, 2006, 6:34pm UTC](https://forum.kirupa.com/t/geturl-coding/205024/4 "2006-10-25T18:34:29Z")

</div>

> [@kerwint;1985227](#):
>
> Yup…but the coding still doesn’t work, even without that space. :jail:

I can’t remember what it is, but there should be a line of Javascript code that you have to place in your HTML file. Then it should work.
