Hi all, I need a login form sitting in an iframe to $_POST the username/pwd to the parent window. But it seems the $_POST data is not being sent. i have tried this actions action="http://www.mydomain.com/login"> Code (markup): and action="javascript:parent.parent_go_url('http://www.mydomain.com/login');" Code (markup): with this .js in the parent window function parent_go_url(url) { document.location=url; } Code (markup): any tips/suggesions/code examples
I'm not really sure, but maybe you can use the target attribute in the form. try and see what it does if you do target="_SELF" or target="_MAIN"
Can you post the form (everything from <form....</form>) from the external site (http://www.mydomain.com/login ?) - so I can help you better
Should it's possible. <form action="http://example.com/to/parent" method="post"> <!-- Some form --> </form> PHP:
@danx10, it isn't exactly an external site, but another part of my website. A part i develop with Codeigniter. The form redirects to the CI-controller but i doesn't login. I assume the $_POST values are lost. btw How can i check if anything is sent?? Now this is the code in login_form_iframe.php. FYI this is the code from the iframe src <div id="contact-banner">some general info</div> <div id="login"><form id="login_form" target="_parent" method="post" action="javascript:parent.parent_go_url('mydomain.com/ci-controller/login');"><table height="34" cellspacing="0"><tr> <td> </td> <td>Username: <input name="usernamae" type="text" size="14" maxlength="10" /></td> <td> Password: <input name="pwd" type="password" size="14" maxlength="10" /></td> <td> <input type="submit" value="login" name="submit"/></td></tr> <tr> <td colspan=4> <div align="right"> <a href="javascript:parent.parent_go_url('mydomain.com/ci-controller/forgot-pwd/');">Forgot password</a> <a href="javascript:parent.parent_go_url('mydomain.com/ci-controller/register/');">Register</a> </div> </td> </tr> </table> </form></div> Code (markup): btw if i copy the code from the iframe without the parent.parent_go_url calls in the div it all works like <div id="contact-banner">some general info</div> <div id="login"><form id="login_form" target="_parent" method="post" action="'mydomain.com/ci-controller/login"><table height="34" cellspacing="0"><tr> <td> </td> <td>Username: <input name="usernamae" type="text" size="14" maxlength="10" /></td> <td> Password: <input name="pwd" type="password" size="14" maxlength="10" /></td> <td> <input type="submit" value="login" name="submit"/></td></tr> <tr> <td colspan=4> <div align="right"> <a href="mydomain.com/ci-controller/forgot-pwd/">Forgot password</a> <a href="mydomain.com/ci-controller/register/">Register</a> </div> </td> </tr> </table> </form></div> Code (markup): But i need to use an iframe to check an user status based on Codeigniter loggedin logic. regards