Faxsy
Faxsy

Reputation: 361

Iframe form should open new page

I have a login box showed as iframe

 <div id="auth-container" >
   <iframe src="loginiframe.php" width="100%" height="100%" frameBorder="0">Browser   not compatible.</iframe>
 </div>

Now inside the loginiframe.php there is a form submit

<form action="auth.php">

where I process my request , and I would like to redirect to another page after process but now

When submit is clicked the auth.php it process the request and redirect to next page but showed in the iframe

I would like to redirect them to account.php page

Upvotes: 0

Views: 55

Answers (2)

DanielTheGeek
DanielTheGeek

Reputation: 193

You could use PHP too using this line:

header('location: account.php');

Upvotes: 0

daf
daf

Reputation: 1329

Your auth.php page could redirect to another page with the following script block:

<script type="text/javascript">
window.parent.location = 'home.php';
</script>

assuming that you're redirecting to "home.php" after authentication.

Upvotes: 1

Related Questions