View Full Version : [FIXED] Can't get form to post data to iframe

01-27-2007, 08:36 AM
For my login form, I want it to post the data to an IFRAME (which is called logingin_iframe) then the page in the IFRAME validates the login information and lets the user know wether login was successful.

I tried:
<form action="login.php" target="logingin_iframe" method="post">
but it doesn't work, it just opens login.php in a new window. (It posts the info properly though)

Here's where I define the IFRAME:
<iframe id="logingin_iframe"></iframe>


Big thanks to feras_wilson, I just needed to use name instead of id


01-27-2007, 01:13 PM
This is the code:


<meta http-equiv="Content-Language" content="sv">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Ny sida 1</title>


<form method="POST" action="login.php" target="frame">
<p><input type="submit" value="Send Form" name="B1"></p>

<p><iframe name="frame" width="594" height="349">




01-27-2007, 09:03 PM
Thanks! It works now!


05-03-2007, 08:13 AM
Hello I was redirected to this site ,while searching for posting data to iframe.
This was mission critical fix to our application and it was really helpful to us.

THanks for sharing this in the forum
Karthik R: