Page 1 of 1

How do you direct PHP output to another frame ?

Posted: Mon Apr 20, 2009 11:18 pm
by FeralReason
I have created a form in one frame and am trying to find a way to direct the output of my php script to the second frame when the user clicks on "submit".

1) I am willing to use either regular frames or iframes.
2) I am also willing to output to a file and make it the src of the 2nd frame -- however, I cannot seem to find a way to refresh the frame automatically when I do this.

Has anyone done something like this ? :?:

Re: How do you direct PHP output to another frame ?

Posted: Mon Apr 20, 2009 11:28 pm
by requinix
Set the target of the <form> to the frame you want.

Code: Select all

<form action="file.php" method="get" target="otherframe">
<!-- ... -->
</form>
 
<iframe name="otherframe"></iframe>

Re: How do you direct PHP output to another frame ?

Posted: Tue Apr 21, 2009 12:02 am
by FeralReason
tasairis,

Works great ! Thank you very much.

Glenn

Re: How do you direct PHP output to another frame ?

Posted: Tue Apr 21, 2009 12:09 am
by FeralReason
Tsaris,

Forgot to mention one thing. Had to change the method to "post". When I used "get" the output was truncated.

Thanx again ! :D