Solution 1 :

If the iFrame has a name, it is a named window and you can target it by name:

target="iframe2"

Problem :

My website has an iframe with a form inside it. What I need is that when the form gets submitted, its target is another iframe, on the parent page. So my setup is basically this:

<div>
    <iframe name="iframe1"></iframe>
    <iframe name="iframe2"></iframe>
</div>

So i’m looking for something like this: <form action="processor.php" target="parent:iframe2">

I am not sure how to do this, help will be much appriciated :). Thank you!

Comments

Comment posted by mplungjan

try

Comment posted by mplungjan

another question is: “Why iframes” ?

Comment posted by target-url”

you can just redirect to the send iframe’s url from the php file itseld using header(“Location :

Comment posted by Combobulated

@mplungjan Thank you, it works! I’m quite confused as to why it does, though…

Comment posted by mplungjan

It is a named window so it should work the same as if you had a named popup

By