473,748 Members | 7,590 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Login form also send email javascript & html

1 New Member
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 3355
acoder
16,027 Recognized Expert Moderator MVP
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
4496
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 current window. I have a cgi script provided by my web host to send the contents of the form through email but they only show me how to use the cgi script to send email through the submit event of the form. ie. <form name="downloadform"...
1
5505
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 is no plain text version. The messages are summaries of answers that people have input into an online survey, and need to have a tabular form. The following somewhat plausible code does not work: dim OMsg Set OMsg =...
13
4031
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 visitor logs in, the login form is no longer on the page, but other content is still there. I want to bring focus to the login form using the onLoad in the body tag.....but if the login form does not exist, I do not want to perform this function.
2
1522
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 expert in any of these webpage developing languages. Now, having said that, here is my problem. I got this program from the book JavaScript "The definitive Guide 3rd Edition, by David Flanagan, published by O'Reilly, <SCRIPT...
13
3320
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 visitor fills out the form and submits it, this calls a rather ordinary asp script like formmail.asp that sends the emails and displays a "thank you" web page. At the very end of my "thank you" web page I placed the following: <script...
1
2035
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 user. When the html form is submitted the user will get an auto email to the email they supplied in the html form. The email they get will redirect them to a login page. My hosting is Windows server that supports asp and other languages but not...
8
1516
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
1698
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
1956
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 Shailendra Deshpande
8
9065
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 page and upon clicking a button , facebook will open and entered information will get auto filled in the login form and form will be auto submitted i tried javascript but, i have doubt , can the document object refer to the facebookpage?? ...
0
9548
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9325
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8244
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6796
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6076
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4607
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4876
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2787
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2215
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.