...

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



DtD
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>

-----------------------

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

~DtD

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


<html>

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

<body>

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

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

<p></p>

</body>

</html>

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

~DtD

karthik_rcs
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
thumbsup:
Karthik R:
:)



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum