The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Webmail Login using javascript

Discussion in 'E-mail Discussions' started by kempes, Sep 3, 2002.

  1. kempes

    kempes Active Member

    Joined:
    Aug 20, 2002
    Messages:
    27
    Likes Received:
    0
    Trophy Points:
    1
    Hi,

    One of my clients needs a javascript to log into his webmail.
    I thought I have seen one in this forum, but cannot find it
    using &Search& button :(

    Anyone kindly enough to share it?

    Thanks.
     
  2. kempes

    kempes Active Member

    Joined:
    Aug 20, 2002
    Messages:
    27
    Likes Received:
    0
    Trophy Points:
    1
    Just an update.

    I found the solution for it. I thought I would share it to everyone here.
    [quote:faa316cf2c]#put this bit between the head tags

    &script language=&javascript&&
    &!-- This version: Hostroute.com --&
    &!-- Based on FTP log in by: Reinout Verkerk --&
    &!-- Although to be fair there is not much of his code left here --&
    &!-- Web Site: http://www.hostroute.com/script_neomail.html --&

    &!-- Begin
    function Login(form) {
    var username = form.username.value;
    var password = form.password.value;
    var server = form.server.value;
    if (username && password && server) {
    var neomail = &http://& + username + &:& + password + &@& + server + &:2095/& + username + &+& + server + &/neomail.pl&;
    window.location = neomail;
    }
    else {
    alert(&Please enter your username and password.\nYour username is the bit before the @ sign in your e-mail address.&);
    }
    }
    // End --&
    &/script&

    #this is what you need to put in the body of the page.

    &form name=login&
    &table border=1 cellpadding=3&
    &tr&
    &td colspan=2 align=center&
    &h2&&b&Logon to webmail! &/b&&/h2&
    &/td&
    &/tr&
    &tr&
    &td&Username:&/td&
    &td&
    &input type=text name=username size=15 maxlength=&26&&
    @
    &input type=&text& name=&server& maxlength=&65& size=&15&&
    &/td&
    &/tr&
    &tr&
    &td&Password:&/td&
    &td&
    &input type=password name=password size=20&
    &/td&
    &/tr&
    &tr&
    &td colspan=2 align=center&
    &input type=button value=&Login!& onClick=&Login(this.form)& name=&button&&
    &/td&
    &/tr&
    &/table&
    &/form&[/quote:faa316cf2c]
     
Loading...

Share This Page