# URL from Embedded iFrame

**URL:** <https://forum.servoy.com/t/url-from-embedded-iframe/19531>\
**Category:** Classic Servoy\
**Created:** [December 5, 2017, 11:24am UTC](https://forum.servoy.com/t/url-from-embedded-iframe/19531 "2017-12-05T11:24:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gordon\_McLean](https://avatars.discourse-cdn.com/v4/letter/g/839c29/32.png) [@Gordon\_McLean](https://forum.servoy.com/u/Gordon_McLean)\
**Post date:** [December 5, 2017, 11:24am UTC](https://forum.servoy.com/t/url-from-embedded-iframe/19531/1 "2017-12-05T11:24:14Z")

</div>

Hi  
Are any of you aware of a way to get the URL of a parent site that is loading a servoy NG solution into an iFrame ?

Essentially I have a multi tenant solution that I need to switch based on the client loading it. In order to avoid using a Combo Box where the user selects the company concerned I want to extract this from the URL they are using to access the site ie [clickdigital.com](http://clickdigital.com) or [servoy.com](http://servoy.com) is this possible ?

effectively I want document.URL that would be triggered using javascript in a native html page.

Many thanks  
Gordon

---

<div class="post-metadata">

**Author:** ![Andrei\_Costescu](https://avatars.discourse-cdn.com/v4/letter/a/e36b37/32.png) [@Andrei\_Costescu](https://forum.servoy.com/u/Andrei_Costescu)\
**Post date:** [January 4, 2018, 5:40pm UTC](https://forum.servoy.com/t/url-from-embedded-iframe/19531/2 "2018-01-04T17:40:25Z")

</div>

If it is something that could be retrieved using javascript inside the iframe you can make an NG service that executes whatever you want.  
You create a service. Add a method to it that executes client side and returns stuff to the server.

If you need more info let me know.

---

<div class="post-metadata">

**Author:** ![Andrei\_Costescu](https://avatars.discourse-cdn.com/v4/letter/a/e36b37/32.png) [@Andrei\_Costescu](https://forum.servoy.com/u/Andrei_Costescu)\
**Post date:** [January 4, 2018, 5:45pm UTC](https://forum.servoy.com/t/url-from-embedded-iframe/19531/3 "2018-01-04T17:45:02Z")

</div>

About accessing the parent’s URL from inside the iFrame: [https://stackoverflow.com/questions/342 … rom-iframe](https://stackoverflow.com/questions/3420004/access-parent-url-from-iframe)  
So basically you won’t be able to do it unless both parent and iFrame are part of the same domain.
