Hi, i'm new on this forum.
I need to get a url of an iframe from a form.
A parent php page with an iframe, in the iframe the user can navigate and when the user has found his page click a button on the php parent page that send a variable to another php page with the frame url.
It is possibile?
10-09-2012, 12:20 PM
marcolettieri
The only thing i don't know how to do is to get the url of the frame. please help
10-10-2012, 09:35 AM
hastx
I think you want to use javascript to communicate across frames. even if you could use PHP, the user experience would not be that great... probably involve page refreshes.
10-10-2012, 10:44 AM
NogDog
If both the parent page and the iframe page are on the same domain, you can access functions in the parent from the iframe via JavaScript as:
Code:
window.parent.functionName()
If they are on different domains, it's possible, but gets quite a bit more convoluted (and I'm not sure I could explain it correctly without doing a lot of research first).
10-11-2012, 04:07 AM
marcolettieri
i don't know javascript =(
it's no possibile with php?
THE FRAME IS A WEBSITE, BETHINK GOOGLE, the user can navigate on the frame and when has found the following webpage click on the submit and send the variable $url that will contain the url of the webpage to geturl.php.