custom login script

gadgetsguy

Verified User
Joined
Nov 4, 2005
Messages
111
Location
Montreal, Canada
I am desperately trying to create a simple HTML form that will allow a user to login to their DA panel from a remote location

I previously was using a dropdown menu with predefined server URLs listed, but for security/privacy issues, would like to be able to have only clients who can provide a valid URL to be able to use it.

I host 30+ servers, so the idea is that the client would be directed to their proper server by the URL they enter.

Here is a non functional demo of what I am trying to do ...

http://a1websolutions.com/login2.html

Any and all help is muchly appreciated.

Tim
 
Last edited:
smtalk:

that form only allows username and password input

I used that form as my starting point, but I would like clients to be able to input a URL too
 
I've modified the one in the help.da to something you need, with javascript.

Code:
<style>
    *{ FONT-SIZE: 8pt; FONT-FAMILY: verdana; }
    b { FONT-WEIGHT: bold; }
    .listtitle { BACKGROUND: #425984; COLOR: #EEEEEE; white-space: nowrap; }
    td.list { BACKGROUND: #EEEEEE; white-space: nowrap; }
</style>
<table cellspacing=1 cellpadding=5>
<tr>
    <td class=listtitle colspan=2>Please enter your Username and Password</td>
</tr>
<form action="" method="POST" name="form">
<input type=hidden name=referer value="/">
<input type=hidden name=FAIL_URL value="http://www.yourdomain.com/login_failed.html">
<input type=hidden name=LOGOUT_URL value="http://www.yourdomain.com/logged_out.html">

<tr>
    <td class=list align=right>Website:</td><td class=list>http://<input type=text name=website id="website">:2222</td>
</tr>
<tr>
    <td class=list align=right>Username:</td><td class=list><input type=text name=username></td>
</tr>
<tr>
    <td class=list align=right>Password:</td><td class=list><input type=password name=password></td>
</tr>
<tr>
    <td class=listtitle align=right colspan=2><input type=submit value='Login' onclick="login();"></td>
</tr>
</form>
</table>

<script type="text/javascript">
function login() {
    website = document.getElementById('website').value;
    document.form.action = 'http://'+website+':2222/CMD_LOGIN';
    document.form.submit();
    return false;
}
</script>
 
Yes, it seems that Arieh's code works perfectly.

You should post it here.

Thank you very much!
 
Last edited:
Back
Top