so, I use an iframe like this: <iframe src="script.php"></iframe> (with other attributes of course).
Now, what I am trying to do, is that the script.php does some things, than outputs a JS script, which should change that SRC attribue of the iframe to some other page.
Is that possible?
Assume only one frame, without id or name:
If the current frame location is at the same domain:
If you have multiple frames, it’s very wise to attach an ID to it. When you want to access the frame through the
framesobject, set a name:Note:
frames[..].location.hrefcan only be changed if the main page and the frame’s location are at the same host, due to the Same Origin policy.