Web Hosting Talk







View Full Version : Making my mail login box work


jamesaspey
09-09-2002, 06:27 PM
Basically i want to make the login box located at the bottom left of www.ukhs.com - work with webmail.ukhs.com so when you enter username and pass it auto logs you in, any ideas?

apokalyptik
09-09-2002, 10:30 PM
sometimes the simplest solutions are the hardest to see...

in your HTML header:

<script LANGUAGE="JavaScript" TYPE="text/javascript">
<!--
function squirrelmail_loginpage_onload() {
document.forms[0].js_autodetect_results.value = '1';
document.forms[0].elements[0].focus();
}
// -->
</script>


HTML form:
<form ACTION="http://webmail.ukhs.com/src/redirect.php" METHOD="POST">
Username: <input TYPE=TEXT NAME="login_username" VALUE="">
<br>
Password: <input TYPE=PASSWORD NAME="secretkey">
<br>
<input TYPE=HIDDEN NAME="js_autodetect_results" VALUE="0">
<input TYPE=HIDDEN NAME="just_logged_in" value=1>
<input TYPE=SUBMIT VALUE="Login">
</form>

jamesaspey
09-11-2002, 05:36 AM
Thankyou - that script works perfectly and used in the site