Log in

View Full Version : Having problem with iframe



tejli007
08-30-2013, 08:17 PM
Hello.

Can someone tell me how to open this code in a iframe?



<form name="process" id="process" method="POST" enctype="multipart/form-data" action="http://www.externalDOMAIN.com/process" >
<input type="hidden" name="script_id" value="64"/>

When i upload a file and it redirects from mydomain.com to externalDOMAIN.com/process

All i want it to open externalDOMAIN.com/process in iframe (so i can add a button "Back" in header of the iframe.

Thank you!!!

jscheuer1
08-31-2013, 03:06 AM
If I understand what your asking, the answer is either to put the form on a separate page (call it - say, form.html, or form.php) on the external domain, then on the mysite domain page where you want it to appear put:


<iframe src="http://externalDOMAIN.com/form.php" width=400 height=300></iframe>

Or you can still host the form on the mysite domain page, and target it to an iframe on that page:


<form method="post" action="http://externalDOMAIN.com/process" target="resultframe">
rest of the form here . . .
</form>
<iframe name="resultframe" src="about:blank" width=400 height=300></iframe>

However, I'm not so sure what of value you will get with a back button. It can only take you back one or more pages in the history stack. If going back just one page after submission, in the first case that would take you back to the form where it could be resubmitted, which could result in a duplicate submission. In the second case, back to the blank page in the iframe.