Hi all,
I've got a site that requires a login for access to a user page... so I have a login box on the main page (HTML), but in an iframe, because the actual login is a PHP document. What I'm looking to do is once the user enters their info and hits log in, the user page targets the parent frame.. but I'm having issues.
I've found how to do it with normal form buttons, but since this is sending data back and forth, I don't really know how to make the form target/have the input button work right.
Here's my code for the login box:
HTML Code:
<form name="loginform" action="" method="post" target="_blank">
<div style="width:100%; text-align:center">
<table>
<tr>
<td colspan="2">
<div id="loginresult" style="background-color: #FFFFE0; border: solid 1px #E6DB55; padding: 10px 5px 10px 5px; margin-bottom:20px">
Register Success! Please login in.
</div>
</td>
</tr>
<tr>
<td align="left">User</td>
<td align="left"><input type="text" name="user_name" id="user_name" onkeydown="onEnter()"></td>
</tr>
<tr>
<td align="left">Password</td>
<td align="left"><input type="password" name="pwd" id="pwd" onkeydown="onEnter()"></td>
</tr>
<tr>
<td align="left"><input type="button" name="login" value="Login" onclick="onLogin()"></td>
<td align="left"><input type="button" name="register" value="Register" onclick="javascript:document.location.href='xx/xx.php';"></td>
</tr>
<tr>
<td colspan="2" align="left"><a href="?lostpassword=true" onclick="">Lost your password?</a></td>
</tr>
</table>
</div>
</form>
Thanks in advance!
|