Jump to content

Recommended Posts

Posted

Is there a way to edit this script so that you do not need the enter your domain name with your username to login to squirrel mail? I want the user to be able to enter "username" not "username@domain.com" in the user field. Is there a way to have that filled in automatically.

 

Any thought would be appreciated.

 

Thanks

Jeff

 

<head>

<script language="JavaScript" type="text/javascript">

<!--

function squirrelmail_loginpage_onload() {

document.forms[0].js_autodetect_results.value = '1';

}

// -->

</script>

</head>

 

<form method="post" action="http://your.host.com/sqmail/src/redirect.php">

<input type="hidden" name="js_autodetect_results" value="0">

User: <input type="text" name="login_username" size="10">

Password: <input type="password" name="secretkey" size="10">

<input type="submit" value="Login">

 

</form>

Posted

Thanks, I took a look at hotmail. I added the lines in bold, however it does fill in the domain for me. I am new to java script and I am trying to learn it. If anyone knows what I am doing wrong, any help would be greatly appreciated.

 

Thanks,

 

Jeff

<html>

<head>

<title>Untitled Document</title>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<script language="JavaScript" type="text/javascript">

<!--

function squirrelmail_loginpage_onload() {

 

document.forms[0].js_autodetect_results.value = '1';

 

var sLogin=document.forms[0].login_username.value;

if (sLogin.indexOf('@') == -1)

{document.forms[0].login_username.value =

document.forms[0].login_username.value + "@jeffrusso.net";}

 

}

// -->

</script>

</head>

<body>

 

<form method="post" action="http://www.jeffrusso.net/sqmail/src/redirect.php">

<input type="hidden" name="js_autodetect_results" value="0">

User : <input type="text" name="login_username" size="30"><br><br>

Password: <input type="password" name="secretkey" size="30">

<input type="submit" value="Login">

</form>

 

</body>

</html>

Posted

I've tried using that script as is (I added my domain to the one line). The problem I had is that a box always came up where it asks you to enter a network password. "username + domain.com" is already filled in. If you try using the demo from the link you gave me, you will see the same problem I had.

  • 10 months later...
Posted
I've tried using that script as is (I added my domain to the one line).  The problem I had is that a box always came up where it asks you to enter a network password.  "username + domain.com" is already filled in.  If you try using the demo from the link you gave me, you will see the same problem I had.

 

Has a solution ever been found for this question? Removing the need for a domain name would add a "professional" touch to the webmail interface.

Posted

Because these are shared and there may be many usernames on the server, it is important that they be differentiated - the way to do that is with the domain name. For instance, I could be lisa+lisa-jill.com, and I could also (and do) have lisa+distantearlymorning.com - if I just used lisa, the server would have no way of knowing WHICH lisa.

 

So I don't believe there will be a solution for this because it's not really broken....

Posted
Because these are shared and there may be many usernames on the server, it is important that they be differentiated - the way to do that is with the domain name.  For instance, I could be lisa+lisa-jill.com, and I could also (and do) have lisa+distantearlymorning.com - if I just used lisa, the server would have no way of knowing WHICH lisa.

 

So I don't believe there will be a solution for this because it's not really broken....

 

I understand the need for the domain. My question is if it is possible to have the domain be defaulted in the javascript so that the user doesn't have to enter it.

Posted

This works for me. Replace the ?'s with the domain and server number.

 

<html>

<head>

 

<script language="JavaScript" type="text/javascript">

 

<!--

 

function add_domain() {

var sLogin=document.forms[0].login_username.value;

if ((sLogin.indexOf('@') == -1) && (sLogin != "")) {

document.forms[0].login_username.value = document.forms[0].login_username.value + "@?????.com";

}

}

 

function squirrelmail_loginpage_onload() {

document.forms[0].js_autodetect_results.value = '1';

}

 

// -->

 

</script>

 

</head>

 

<body onLoad="self.focus();document.forms[0].login_username.focus()">

 

<form method="post" action="http://server??.totalchoicehosting.com/sqmail/src/redirect.php">

 

<input type="hidden" name="js_autodetect_results" value="0">

 

User: <input type="text" onBlur="add_domain();" name="login_username" size="20"><br><br>

Password: <input type="password" name="secretkey" size="20"><br><br>

 

<input type="submit" value="Login">

 

</form>

 

</body>

 

</html>

Posted

Code works like a charm! :clapping:

Thank you for providing it.

Added it to my site for easier access when I am out of town.

 

2 out of 4 wishes granted in 2 days WOW!

 

Still to go but not expected to be resolved soon:

- Wish there were some way to use a similar entry form into a password protected page instead of the default popup window when using Web Protect feature in cpanel.

- Free website search code that includes PDF files (FastFind is great...but doesn't support PDF)

 

-Samantha

  • 2 years later...
Posted

When implementing the squirelmail script, it pops up another login screen (so kinda defeats the purpose):

 

The server www.my domain name.com at WebMail requires a username and password.

 

Warning: This server is requesting that your username and password be sent in an insecure manner (basic authentication without a secure connection).

 

When modifying the script for my server, I had to change the server path to <form method="post" action="http://www.my domain name.com/3rdparty/squirrelmail/src/webmail.php"> and I tried with the redirect.php ending, but both act the same.

 

Any ideas?

 

Thanks,

 

Todd

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...