Jump to content

Webmail Java Form Code


Recommended Posts

I got bored -

 

Nice little script to login to webmail - i think this was asked a while back...

 

 

----------------------

<script language="javascript">

function Login(form) {

var username = form.username.value;

var password = form.password.value;

var server = form.server.value;

if (username && password && server) {

var horde = "http://" + username +"+"+server+ ":" + password + "@" + server + ":2095/" + "horde/index.php";

window.status='WebMail';

window.location = horde;

 

}

else {

alert("Please fill the username and the password";

}

}

 

 

 

 


WebMail

User:

@

Password:

Link to comment
Share on other sites

Note: I substituted **** for my actual domain name.

 

Previously a discussion stated that webmail can be accessed through www.****/webmail/

 

I attempted to do this, but it prompted an input box for username and password. None of the existing usernames and passwords worked (I tried username: info, username: info@****, and user: info+****, etc.).

 

So, I am thankful for this script that you developed in your "spare" time. I would like to use it, but having copied and pasted, it would not work. I added a ">" to the "</form" at the end and changed the hidden value to match my actual domain name, but it still would not work.

 

I do not know if this is a problem with my login to webmail in general or not. I can access the webmail through the control panel, but I would like to access it from the web without logging into the control panel everytime. Please advise. Thank you for your time.

Link to comment
Share on other sites

This is pretty dang cool.

 

This forum apparently enters some sly little semi-colons into the code where it doesn't belong.

 

There was also one } missing.

 

Go here for the code to copy and paste and what-to's.

 

Bill, is there any way to go straight into Horde from the single Login button on your form or do we still have to click Login on the Horde Login screen?

 

Thanks.

Lianna

Link to comment
Share on other sites

:)

 

You're welcome, Steve.

 

 

Bill, I'm thinking that if you could incorporate the .php page stuff that actually does the real login, it would take you straight from your code into the mailbox. Thinkin out loud, but since I'm not bored, I guess I'm out of this one.

 

..psstt... by the way, did I mention that I don't know code?? :)

 

L

Link to comment
Share on other sites

Lianna,

 

One of these days (and very soon, I predict) your excuse of "I don't know HTML code" will not be tolerated by those of us who know that you're much too smart to say you don't know HTML. You want me to believe that you don't even have an HTML pimer book in your office? Did you look between the baby bottle and the toothpase?

 

:-)

kw

Link to comment
Share on other sites

:lol:

 

Yeah, I know it's starting to sound pretty lame isn't it? Hooray!

 

Truth is, I do have a book and have had for over 4 years. Problem is that I haven't opened it. Haven't had to. I said somewhere the other day, that me and code are like me and Spanish: after 7 years, I can read it, but I can't speak it. :P

 

I admit, I'm learning, bits and pieces as we go. The more I see, the more I get out of it each time. I am a fairly decent programmer, but just not this language.

 

So I guess one of these days, I'll have to come up with a better excuse! :lol:

 

Lianna

Link to comment
Share on other sites

BTW, here's another version of Bill's script. I removed a lot of redundant <font> tags, and used <h1> and <h2> tags just to simplify the script. I also have each field on it's own row.

 

You can view the resulting page at: http://www.irricomp.com/imail.htm

 

And here is the code:

 

<script language="javascript">

function Login(form) {

var username = form.username.value

var password = form.password.value

var server = form.server.value

if (username && password && server) {

var horde = "http://" + username +"+"+server+ ":" + password + "@" + server + ":2095/" + "horde/index.php"

window.status='WebMail'

window.location = horde

 

}

else {

alert("Please fill the username and the password")

}

}

</script>

 

<form name=login>

<table border=0 cellpadding=1 align="center" width="430">

 

<tr><td align=center>

<font color="#000000" face="Verdana, Arial, Helvetica, sans-serif">

<h1><b>WebMail Login</b></h1>

<input type="hidden" value="******" name="server" maxlength="30" size="15">

</font></td></tr>

 

<tr><td align=center>

<h2>User:  

<input type=text name=username size=15 maxlength="30">

</h2></td></tr>

 

<tr><td align=center>

<h2>Password:  

<input type=password name=password size=20>

</h2></td></tr>

 

<tr><td align=center>

<input type=button value="Login" onClick="Login(this.form)" name="button">

</td></tr>

 

</table>

</form>

Link to comment
Share on other sites

  • 2 months later...

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...