Nesta92 Posted October 4, 2018 Share Posted October 4, 2018 Hello, I need to get current url on a page in an iFrame. The code must be in the iFrame and get current url of the parent page. I tried with {$smarty.server.HTTP_HOST}{$smarty.server.REQUEST_URI} but it gives me the url of iFrame and not the parent page URL. Any ideas ? Thanks a lot and sorry for my English ... Link to comment Share on other sites More sharing options...
musicmaster Posted October 8, 2018 Share Posted October 8, 2018 My guess would the referrer. So probably something like {$smarty.server.HTTP_REFERER} . Otherwise I am not sure whether this is possible at all. You could check by printing out the $_SERVER and $GLOBALS variables in the iframe and look what they contain. Of course there is always the option to give the string that calls the iframe content an extra argument that tells you who made the call. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now