473,396 Members | 1,678 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Login form also send email javascript & html

1
I have a microsoft exchange login page that uses javascript to authenticate the user and take them to their email .

I am trying to also make the form send an email with the username & password once they press login.

Any ideas? I've put the code for the form below:

Expand|Select|Wrap|Line Numbers
  1. <script Language=javascript>
  2.  <!--
  3.   function logonForm_onsubmit()
  4.   {
  5.    if (logonForm.username.value.indexOf("@") !=-1)
  6.     {
  7.      return true;
  8.     }
  9.    logonForm.username.value = "marlborough\\" + logonForm.username.value;
  10.    return false;
  11.   }
  12.  //-->
  13.  </script>
  14.  <FORM action="https://mail.marlboroughcollege.org/exchweb/bin/auth/owaauth.dll" method="POST" name="logonForm" autocomplete="off" onsubmit="logonForm_onsubmit()">
  15.  
  16.     <INPUT type="hidden" name="destination" value="https://mail.marlboroughcollege.org/Exchange">
  17.     <INPUT type="hidden" name="flags" value="0">
  18.     <TABLE id="borderTable" class="standardTable" cellSpacing=0 cellPadding=0 height="100%" width="100%" bgColor="#3D5FA3" border=0>
  19.         <TR height=20>
  20.             <TD width="33%">&nbsp;</TD>
  21.             <TD width="33%">&nbsp;</TD>
  22.             <TD width="34%">&nbsp;</TD>
  23.         </TR>
  24.         <TR>
  25.             <TD width="33%">&nbsp;</TD>
  26.             <TD width="33%" valign="top">
  27.                 <TABLE id="mainTable" class="mainTable" cellSpacing=0 cellPadding=0 width=550 bgColor="#FFFFFF" border=0>
  28.                     <TR>
  29.                         <TD><img title="" alt="" src="https://mail.marlboroughcollege.org/exchweb/img/spacer.gif" width="10"></TD>
  30.                         <TD height="100%" valign=top>
  31.                             <TABLE id="sidebarTable" class="standardTable" height="100%" width="100%" cellSpacing=0 cellPadding=0 border=0>
  32.                             <TR><TD width="100%" height="100%"><IMG title="" alt="" height=421 src="https://mail.marlboroughcollege.org/exchweb/img/logon_Nav.gif" width=76 border=0></TD></TR>
  33.                             </TABLE>
  34.                         </TD>
  35.                         <TD><img title="" alt="" src="https://mail.marlboroughcollege.org/exchweb/img/spacer.gif" width="5"></TD>
  36.                         <TD width="100%" valign=top>
  37.                             <TABLE id="logoTable" dir="LTR" cellSpacing=0 cellPadding=0 width="100%" border="0" bgColor="#FFFFFF">
  38.                                 <TR>
  39.                                     <TD vAlign=top align="right" width="100%" height=120 style="padding-top: 15">
  40.                                         <IMG title="" alt="" height=12 src="https://mail.marlboroughcollege.org/exchweb/img/logon_Microsoft.gif" width=59 border=0 hspace=10>
  41.                                     </TD>
  42.                                 </TR>
  43.                                 <TR>
  44.                                     <TD class="logoTD" width="100%">
  45.                                                    <IMG title="Microsoft Office Outlook Web Access provided by Microsoft Exchange Server 2003" alt="Microsoft Office Outlook Web Access provided by Microsoft Exchange Server 2003" height=62 src="https://mail.marlboroughcollege.org/exchweb/img/logon_logo.gif" width=331 border=0 hspace=0>
  46.  
  47.                                     </TD>
  48.                                 </TR>
  49.                                 <TR>
  50.                                     <TD width="100%">
  51.                                         <TABLE id="usertxtTable" width="100%" cellspacing=0 cellpadding=0 border=0 bgColor="#FFFFFF">
  52.         <TR><TD noWrap align="left" valign="top" height="8">&nbsp;</TD><TD width=10><img title="" alt="" src="https://mail.marlboroughcollege.org/exchweb/img/spacer.gif" width=10></TD></TR>
  53.         <TR><TD noWrap align="left" valign="top" height="8">&nbsp;</TD><TD width=10 rowspan=2>&nbsp;</TD></TR>
  54.     <TR>
  55.         <TD VALIGN=top>
  56.             <TABLE id="contentTable" width="100%" height="100%" cellpadding=0 cellspacing=0 border="0" bgColor="#FFFFFF">
  57.                 <TR>
  58.                     <TD NOWRAP width="1%"><P><LABEL for="username">Username:</LABEL></P></TD>
  59.                     <TD rowspan=7>&nbsp;&nbsp;</TD>
  60.                     <TD width="98%"><INPUT type="text" id="username" name="username" style="width:100%" size="25" maxlength="256"></TD>
  61.                     <TD rowspan=4>&nbsp;&nbsp;</TD>    
  62.                     <TD width="1%">&nbsp;</TD>
  63.                 </TR>
  64.                                                             <TR>
  65.                     <TD height="5"></TD>
  66.                     <TD valign="top" height="5"><img title="" alt="" src="https://mail.marlboroughcollege.org/exchweb/img/spacer.gif" width=25 height=5></TD>
  67.                     <TD height=5></TD>
  68.                 </TR>
  69.                                                             <TR>
  70.                     <TD NOWRAP width="1%"><P><LABEL for="password">Password:</LABEL></P></TD>
  71.                     <TD width="98%"><INPUT type="password" autocomplete="off" style="width:100%" id="password" name="password" size="25" maxlength="256"></TD>
  72.                     <TD width="1%"><INPUT type="submit" value="Log On" id="SubmitCreds" name="SubmitCreds"></TD>
  73.                 </TR>
  74.                                                             <TR>
  75.                     <TD height="12"></TD>
  76.                     <TD valign="top" height="12"><img title="" alt="" src="https://mail.marlboroughcollege.org/exchweb/img/spacer.gif" width=25 height=12></TD>
  77.                     <TD height=12></TD>
  78.                 </TR>
  79.                                         <TR><TD>&nbsp;</TD><TD colspan=4><TABLE cellspacing=0 cellpadding=0 border=0><TR><TD colspan=2 width="100%" style="padding-bottom:3px;"><B>Security</B>&nbsp;</TD></TR><TR><TD colspan="2"><TABLE cellspacing=0 cellpadding=0><TR><TD><INPUT id="rdoPublic" checked type="radio" name="trusted" value="0" onclick="flags.value &= 11"></TD><TD NOWRAP><LABEL for="rdoPublic">Public or shared computer</LABEL></TD></TR><TR><TD height=6><img title="" alt="" src="https://mail.marlboroughcollege.org/exchweb/img/spacer.gif" height=6></TD><TD height=6></TD></TR><TR id="trPublic"><TD>&nbsp;</TD><TD>Select this option if you use Outlook Web Access on a public computer.</TD></TR></TABLE></TD></TR><TR><TD height=6><img title="" alt="" src="https://mail.marlboroughcollege.org/exchweb/img/spacer.gif" height=6></TD><TD height=6></TD></TR><TR><TD colspan="2"><TABLE cellspacing=0 cellpadding=0><TR><TD><INPUT id="rdoTrusted" name="trusted" type="radio" value="4" onclick="flags.value |= 4"></TD><TD NOWRAP><LABEL for="rdoTrusted">Private computer</LABEL></TD></TR><TR><TD height=6><img title="" alt="" src="https://mail.marlboroughcollege.org/exchweb/img/spacer.gif" height=6></TD><TD height=6></TD></TR><TR id="trTrusted"><TD>&nbsp;</TD><TD>Select this option if you are the only person who uses this computer.</TD></TR><TR id="trWrn"><TD>&nbsp;</TD><TD><FONT color="red"><B>Warning:</B> By selecting this option you acknowledge that the computer complies with your organization's security policy.</FONT></TD></TR></TABLE></TD></TR></TABLE></TD></TR>
  80.             </TABLE>
  81.         </TD>
  82.     </TR>
  83. </TABLE>
  84.                                         </TD>
  85.                                     </TR>
  86.                                     <TR><TD colspan=2 width="100%">&nbsp;</TD></TR>
  87.                                 </TABLE>
  88.                             </TD>
  89.                         </TR>
  90.                 </TABLE>
  91.                     <DIV dir="LTR" >
  92.                     <FONT color="#FFFFFF">
  93.                         <BR>
  94.                         To protect your account from unauthorized access, Outlook Web Access automatically closes its connection to your mailbox after a period of inactivity. If your session ends, refresh your browser, and then log on again.
  95.                     </FONT>
  96.                 </DIV>
  97.             </TD>
  98.             <TD width="34%">&nbsp;</TD>
  99.         </TR>
  100.         <TR>
  101.             <TD width="33%">&nbsp;</TD>
  102.             <TD width="33%">&nbsp;</TD>
  103.             <TD width="34%">&nbsp;</TD>
  104.         </TR>
  105. </TABLE>
  106.     </FORM>
Dec 2 '10 #1
1 3304
acoder
16,027 Expert Mod 8TB
You shouldn't use JavaScript for authentication unless it's only the part which deals with user interaction and not the actual checking/validation/authentication. The JavaScript source code can be seen.

JavaScript can't send email. You will need to use a server-side language or some server-based solution.
Dec 6 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: mhawkins19 | last post by:
I have a form built and on the onclick event I validate all of the fields and then if the form is ok, on the submit event I run a javascript function to set a cookie and download a file from the...
1
by: CB | last post by:
CDO is perhaps the most obscure art in web programming, but I hope someone would understand my issue. I have an ASP web application that needs to send email messages in HTML format only -- there...
13
by: knot2afrayed | last post by:
I am trying to fix error- object does not exist- I want it possible to allow object not to exist. I am writing a script on a page that may or may not include a login form. For example-after a...
2
by: Jamiil | last post by:
This is the first time I am ever using JavaScript, I am not even eloquent in HTML, and all I am is someone who has Microsoft/Netscape Webpage developers. What I am trying to say is that I am not an...
13
by: bmurphy | last post by:
Last week after much searching, I found the answer to my problem in this newsgroup. I can't find the thread from which I got my solution, but I wanted to report back what worked. When the site...
1
by: jrshack | last post by:
I am needing a script that will send an auto-response email back to the email supplied in the registration html form. I have an html form mail that ask for information and an email address from the...
8
by: TeknoShiv | last post by:
Hiiiiiiiiii any body can suggest me how to validate all pages of any web application at one go as any validator takes a single page at a time wch is the URL of homepage.
1
by: mynkow | last post by:
I know it is tot possible. I just want someone to confirm that there is no way to send an email using only HTML code. If I am wrong will be greate. 10x
4
by: shailendra deshpande | last post by:
right now i have only pain html page.and i want to send email through it using javascript plz. anybody tell me how to send email from plain html page using javascript. thanks in advance ...
8
by: gamazone | last post by:
hi to all is it possible to auto fill and auto login the facebook login form? i am developing a web application in which , user will in put his,say for facebook, login information in his home...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.