PDA

View Full Version : Iframe redirect to second iframe



aboutautism
01-20-2005, 09:54 AM
I have a large iframe which is named 'window' (to accomodate a php/mysql database) which is embedded within index.htm and has src="main.htm"

main.htm has a small iframe (named 'login') with a src=php/login.php

All of this works perfectly but as you would expect the php login shows the php pages within the small iframe.

Is it possible to have a javascript action which allows the login, then opens the subsequent php pages within the 'window' iframe on index.htm?

The code for my large iframe is
<iframe align="top" frameborder="0" height="500" width="100%" name="window" src="main.htm"></iframe>

The code for my smaller iframe is
<iframe align="top" height="300" width="300" src="php/login.php" name="login" scrolling="no" frameborder="0" target="window"></iframe>

any help much appreciated

many thanks - martin

I was going about this completely wrong, the target needed to be set within my php page, not the iframes themselves:
<form action="login.php" method="post" onSubmit="return EW_checkMyForm(this);" target="_parent">