...

View Full Version : Challenge... loging into a remote site from a page



atrsite
12-09-2004, 05:55 AM
Ok, I have my username/password login box and the validation script, but how can I get it to log into a remote site(http://allteensrule.proboards40.com)?

Validation Code


<script type="text/javascript">
function validate(oForm)
{
var pwd = oForm.pwd1.value.toLowerCase();
if (oForm.username.value.toLowerCase() == "Mike" && oForm.pwd1.value.toLowerCase() == "thisisnotreal"){
window.location = "contentpage.htm";
}
else
{
alert("Username or Password is incorrect, you should not be here.");
oForm.username.focus();
oForm.username.value="Try Again!";
oForm.pwd1.value="";
window.location="http://www.allteensrule.com";
}
}
</script>

Form Code


<form id="form1" action="">
<table>
<tr>
<td>Username: </td><td><input type="text" name="user" /></td>
</tr>
<tr>
<td>Password: </td><td><input type="text" name="pass" /></td>
</tr>
<tr>
<td colspan="2" align="center"><input type="submit" value="Login" onclick="validate(this.form)"</td>
</tr>
</table>
</form>

Willy Duitt
12-09-2004, 06:07 AM
Oh, I thought this was a challange but it is a question.....

atrsite
12-09-2004, 06:42 AM
Sorry...



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum