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.

submitting the neomail login through a form

Discussion in 'E-mail Discussions' started by hedgehog, Jan 20, 2003.

  1. hedgehog

    hedgehog Well-Known Member

    Joined:
    Nov 3, 2001
    Messages:
    122
    Likes Received:
    0
    Trophy Points:
    16
    Hi all,

    Is it possible to create a form to submit the neomail login to ...errr.. neomail?

    What I am looking for is adding a form to a page where visitors can enter their email and password and click submit to be logged in neomail.

    Any ideas would be appreciated.

    Hedgy
     
  2. manokiss

    manokiss Well-Known Member

    Joined:
    Mar 31, 2002
    Messages:
    571
    Likes Received:
    0
    Trophy Points:
    16
    hi, try this code

    hi, try this code, you can change the &yourdomain.com& for your domain name.

    See ya ;)



    _____________


    &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&
    &hr&
    &table border=0 cellpadding=1 align=&center& width=&430&&
    &tr&
    &td colspan=3 align=center height=&42&&
    &h2&&font color=&#000000&&&b&&font face=&Verdana, Arial, Helvetica, sans-serif& size=&4&&WebMail&/font&&font color=&#000000& face=&Verdana, Arial, Helvetica, sans-serif&&
    &input type=&hidden& value=&yourdomain.com& name=&server& maxlength=&30& size=&15&&
    &/font&&/b&&/font&&/h2&
    &/td&
    &/tr&
    &tr&
    &td width=&81& height=&44&&&font color=&#000000& face=&Verdana, Arial, Helvetica, sans-serif& size=&2&&User:&/font&&/td&
    &td width=&146& height=&44&& &font color=&#000000& face=&Verdana, Arial, Helvetica, sans-serif&&
    &input type=text name=username size=15 maxlength=&30&&
    @ &/font&&/td&
    &td width=&81&&&font color=&#000000& face=&Verdana, Arial, Helvetica, sans-serif& size=&2&&Password:&/font&&/td&
    &td colspan=&2&& &font color=&#000000& face=&Verdana, Arial, Helvetica, sans-serif&&
    &input type=password name=password size=20&
    &input type=button value=&Login& onClick=&Login(this.form)& name=&button&&
    &/font&&/td&
    &/tr&
    &/table&
    &/form&


    _________________
     
  3. hedgehog

    hedgehog Well-Known Member

    Joined:
    Nov 3, 2001
    Messages:
    122
    Likes Received:
    0
    Trophy Points:
    16
    Thanks,

    : )
     
  4. OrangeUFO

    OrangeUFO Registered

    Joined:
    Jan 22, 2003
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Webmail Form

    Hi, l have just seen your code for the webmail form, fantastic l've been trying to work it out for ages!
    However, when l tried it it came up with an error and doesn't seem to do anything!
    Please help?
     
  5. manokiss

    manokiss Well-Known Member

    Joined:
    Mar 31, 2002
    Messages:
    571
    Likes Received:
    0
    Trophy Points:
    16
    what error ?

    what error ? please paste here.

    see ya
     
  6. manokiss

    manokiss Well-Known Member

    Joined:
    Mar 31, 2002
    Messages:
    571
    Likes Received:
    0
    Trophy Points:
    16
    corrected !

    okie, was my fault...try this, i corrected, remember change the &yourdomain.com& for your domain name.
    Are in two places in the code.

    Enjoy !


    _____________________

    &html&
    &head&
    &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&
    &/head&
    &body&




    &form name=login&
    &p& &/p&&table width=&350& border=&0& align=&center&&
    &tr&
    &td height=&50& colspan=&2&&&div align=&center&&&font color=&#000000&&&b&&font face=&Verdana, Arial, Helvetica, sans-serif& size=&4&&WebMail&/font&&font color=&#000000& face=&Verdana, Arial, Helvetica, sans-serif&&
    &input type=&hidden& value=&yourdomain.com& name=&server& maxlength=&30& size=&15&&
    &/font&&/b&&/font&&/div&&/td&
    &/tr&
    &tr&
    &td width=&30%& height=&30&&&font face=&Arial, Helvetica, sans-serif&&Username:&/font&&/td&
    &td width=&70%& height=&30&&&font color=&#000000& face=&Verdana, Arial, Helvetica, sans-serif&&
    &input type=text name=username size=15 maxlength=&30&&
    &font size=&2& face=&Arial, Helvetica, sans-serif&&@yourdomain.com&/font&&/font&&/td&
    &/tr&
    &tr&
    &td width=&30%& height=&30&&&font face=&Arial, Helvetica, sans-serif&&Password:&/font&&/td&
    &td width=&70%& height=&30&&&font color=&#000000& face=&Verdana, Arial, Helvetica, sans-serif&&
    &input type=password name=password size=20&
    &/font&&/td&
    &/tr&
    &tr&
    &td width=&30%& height=&30&& &/td&
    &td width=&70%& height=&30&&
    &div align=&center&&&font color=&#000000& face=&Verdana, Arial, Helvetica, sans-serif&&
    &input type=button value=&Login& onClick=&Login(this.form)& name=&button&&
    &/font&&/div&&/td&
    &/tr&
    &/table&
    &p& &/p&
    &/form&
    &/body&
    &/html&

    ___________________
     

Share This Page