Hey guys, I'm working on making my own login box, but I'm having a little trouble. Here's my situation. On my website, I have a login box to my forums. It is in an iframe because everytime I put it on the actual page the <div> tags would get messed up and the entire body would be invisible. So, every time I use the login box to log into my forums, it logs in, but then it re-directs back to the last page it was viewing. In this case, it would be the login page from the iframe. I was wondering how I would go about making it redirect to the forum index. I'm pretty certain it has to do with the vB's login.php page, but I'm not completely sure. I was thinking of re-doing the login script so it has the remember me function as well, I know how to do this. I just need help with the re-direct. Here's a link to my website if it would help any.
http://www.hollywoodnhouse.com
If this helps at all, here's the code for the login page I made:
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
<style type="text/css">
<!--
body,td,th {
font-family: Geneva, Arial, Helvetica, sans-serif;
font-size: 12px;
color: #000000;
}
body {
background-color: #ebebeb;
}
-->
</style></head>
<SCRIPT TYPE="text/javascript">
<!--
// copyright 1999-2001 Idocs, Inc. http://www.idocs.com/tags/
// Distribute this script freely, but keep this
// notice with the code.
var submitRolls = new Object();
function submitroll(src, oversrc, name)
{
this.src=src;
this.oversrc=oversrc;
this.name=name;
this.alt="Submit Query";
this.write=submitroll_write;
}
function submitroll_write()
{
var thisform = 'document.forms[' + (document.forms.length - 1) + ']';
submitRolls[this.name] = new Object();
submitRolls[this.name].over = new Image();
submitRolls[this.name].over.src = this.oversrc;
submitRolls[this.name].out = new Image();
submitRolls[this.name].out.src = this.src;
document.write
(
'<A onMouseOver="if (document.images)document.images[\'' + this.name + "'].src=submitRolls['" + this.name + '\'].over.src"' +
' onMouseOut="if (document.images)document.images[\'' + this.name + "'].src=submitRolls['" + this.name + '\'].out.src"' +
' HREF="javascript:'
);
if (this.sendfield)
{
if (! this.sendvalue)
this.sendvalue = 1;
document.write(thisform, ".elements['", this.sendfield, "'].value='", this.sendvalue, "';");
}
document.write(thisform + '.submit();void(0);"');
if (this.msg)document.write(' onClick="return confirm(\'' , this.msg, '\')"');
document.write('>');
document.write('<IMG SRC="' + this.src + '" ALT="' + this.alt + '" BORDER=0 NAME="' + this.name + '"');
if (this.height)document.write(' HEIGHT=' + this.height);
if (this.width)document.write(' WIDTH=' + this.width);
if (this.otheratts)document.write(' ' + this.otheratts);
document.write('></A>');
if (this.sendfield)
{
document.write('<INPUT TYPE=HIDDEN NAME="' + this.sendfield + '">');
document.forms[document.forms.length - 1].elements[this.sendfield].value='';
}
}
//-->
</SCRIPT>
<!-- login form -->
<form action="http://www.hollywoodnhouse.com/forum/login.php" method="post" target="_parent" onsubmit="md5hash(vb_login_password, vb_login_md5password, vb_login_md5password_utf, 0)">
<script type="text/javascript" src="clientscript/vbulletin_md5.js"></script>
<table cellpadding="0" cellspacing="3" border="0">
<tr>
<td class="smallfont"><label for="navbar_username"><size=10>Name</size></label></td>
<td><input type="text" class="bginput" style="font-size: 10px" name="vb_login_username" id="navbar_username" size="10" accesskey="u" tabindex="101" value="User Name" onfocus="if (this.value == 'User Name') this.value = '';" /></td>
</tr>
<tr>
<td class="smallfont"><label for="navbar_password"><size=10>Password</size></label></td>
<td><input type="password" class="bginput" style="font-size: 10px" name="vb_login_password" id="navbar_password" size="10" accesskey="p" tabindex="102" /></td>
</tr>
</table>
<td>
<SCRIPT TYPE="text/javascript">
<!--
var sr = new submitroll("images/login.jpg","images/login_over.jpg","mysubmit");
sr.write();
//-->
</SCRIPT>
<NOSCRIPT>
<input type="image" value="submitname" src="images/login.jpg" width="113" height="30" border="0" alt="Log in" name="image" roll>
</NOSCRIPT>
<input type="hidden" name="s" value="" />
<input type="hidden" name="do" value="login" />
<input type="hidden" name="vb_login_md5password" />
<input type="hidden" name="vb_login_md5password_utf" />
</form>
<!-- / login form -->
Any help is appreciated.