...

View Full Version : Javascript E-mail



Twister
10-15-2003, 06:41 PM
I have a web page that when you click on a button that an e-mail is generated with some standard text. This is used for password resets. I have a password generator that is at the top of the page so that when you go the page that a password is generated. WHat I am looking for it to have the password that is generated placed in the E-mail. Is this possible with Javascrip.

sciguyryan
10-15-2003, 07:47 PM
Just add an extrafunction to the script that writes the email and, have that script write the code to the email.

Twister
10-15-2003, 08:16 PM
You may need to give me a little more informaion than that. Maybe a sample script or something.

Here is some sample code :

<html>

<head>
<title>No More Underlines </title>
<style TYPE="text/css">
<!--
A{text-decoration: none;} A:link{color: #006366;}A:visited{color: #006366;}

-->
</style>

<script language="javascript">


var win = null;
function NewWindow(mypage,myname,w,h,scroll){
LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
settings =
'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable'
win = window.open(mypage,myname,settings)
}

</script>


</head>

<body>

<table border="1" width="960" bgcolor="#336699">
<tr>
<td width="100%">
<p align="center"><b><font color="#FFFFFF">Password</font></b></td>
</tr>
</table>




<tr>
<td width="4%" valign="top"><font size="2">
<img border="0" src="../../../../images/bullet.gif" width="7" height="12"></font></td>
<td width="96%" valign="top"></td>
</tr>
<tr>
<td width="100%" valign="top" colspan="2">
<div align="center">
<center>
<table border="1" cellpadding="4" cellspacing="0" style="border-collapse: collapse" bordercolor="#C0C0C0" width="70%" id="AutoNumber11">
<tr>
<td width="100%" bgcolor="#336699" align="center"><b>
<font color="#FFFFFF" size="2">Random Password Generator</font></b></td>
</tr>
<tr>
<td width="100%">
<div align="center">
<div align="center">
<center>
<table border="0" cellpadding="4" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber12">
<tr>
<td width="100%" align="center"><font color="#FF0000" face="Arial" size="2"><u>DO NOT</u>
give the user on the phone the new password, this will be e-mailed to the
site admin for the user to get.</font></td>
</tr>
<tr>
<td width="100%">
<div align="center">
<!--webbot bot="Include" U-Include="acsr_nfuse_passwords.htm" TAG="BODY" startspan -->

<table border="0" cellpadding="4" cellspacing="0" width="152" style="border-collapse:
collapse;width:200">
<colgroup>
<col width="152" style="width: 114pt">
</colgroup>
<tr height="17" style="height:12.75pt">
<td style="color: windowtext; font-size: 10.0pt; font-weight: 400; font-style: normal; text-decoration: none; font-family: Arial; text-align: general; vertical-align: bottom; white-space: nowrap; border: medium none; padding-left: 1px; padding-right: 1px; padding-top: 1px; width:100%" align="center">
<font color="#FF0000"><span style="font-size: 12pt; font-weight: 700">

<script language=javascript><!--
// Webs Unlimited's J-BOTS FrontPage 2002 JavaScript Generator version 4.0
// Copyright Webs Unlimited 1998, 1999, 2000, 2001 All rights reserved - http://WebsUnlimited.com
TextInput233205 = new Object();
TotalTextInput233205 = 99;
TextInput233205[1]= 'wt4U0FVT';
TextInput233205[2]= '1SGJ173H';
TextInput233205[3]= 'Q3mo1MUW';
TextInput233205[4]= 'GcNqmQkJ';
TextInput233205[5]= 'CU2KUw0D';
TextInput233205[6]= 'eUSgqJc1';
TextInput233205[7]= 'mkvbw5o5';
TextInput233205[8]= '92lF3VL0';
TextInput233205[9]= '9Qf5Y2OU';
TextInput233205[10]= '9Ob874x3';
TextInput233205[11]= 'JR980773';
TextInput233205[12]= 'jTZJfx5G';
TextInput233205[13]= 'Jqt71Eo4';
TextInput233205[14]= 'DjsavC9a';
TextInput233205[15]= 'F7d5Kuy1';
TextInput233205[16]= 'nDBo04F6';
TextInput233205[17]= '1Kk6R7dk';
TextInput233205[18]= '0Bi588Vg';
TextInput233205[19]= 'lJ62Ak15';
TextInput233205[20]= 'UdT2HHRa';
TextInput233205[21]= 's9V2J0TS';
TextInput233205[22]= 'U83wAR40';
TextInput233205[23]= '9dHA0zy3';
TextInput233205[24]= 'XQBZ657R';
TextInput233205[25]= 'TL09Qiz9';
TextInput233205[26]= '828S8f9D';
TextInput233205[27]= 'B453911r';
TextInput233205[28]= 'j6NLJ73X';
TextInput233205[29]= '2R08713W';
TextInput233205[30]= 'j6246HuT';
TextInput233205[31]= 'M0i1J873';
TextInput233205[32]= 'n3Jss7h7';
TextInput233205[33]= '5lL1kbe3';
TextInput233205[34]= 'MS6fdm7W';
TextInput233205[35]= '9Wafu34h';
TextInput233205[36]= 'A1jbeAEC';
TextInput233205[37]= '978Qj6o9';
TextInput233205[38]= '3r80MA6B';
TextInput233205[39]= 'zERx2XV9';
TextInput233205[40]= 'U9st0lk3';
TextInput233205[41]= 'sOwNMFt2';
TextInput233205[42]= 'zXIdp5f4';
TextInput233205[43]= 'EjR3h9uC';
TextInput233205[44]= 'Y2na8Xh5';
TextInput233205[45]= 'sYmqIjDi';
TextInput233205[46]= 'ySDvQcBL';
TextInput233205[47]= 'FCnZ92sy';
TextInput233205[48]= 'potMmmUi';
TextInput233205[49]= 'XOCrw7Nx';
TextInput233205[50]= 'UH5h2jN9';
TextInput233205[51]= 'w4OcFlhW';
TextInput233205[52]= 'bD3SmYZ2';
TextInput233205[53]= '9b179jO4';
TextInput233205[54]= 'ibx6IMO9';
TextInput233205[55]= 'QuTt17ZE';
TextInput233205[56]= 'VMO8xjYP';
TextInput233205[57]= 'EUz3976q';
TextInput233205[58]= 'ZU6J6cVc';
TextInput233205[59]= '31FkIPDo';
TextInput233205[60]= 'J6PHqkue';
TextInput233205[61]= 'OmOie3nM';
TextInput233205[62]= 'KYv4d3C9';
TextInput233205[63]= '1488k6uF';
TextInput233205[64]= '0WM26EFu';
TextInput233205[65]= 'D2DuUg46';
TextInput233205[66]= 'IK84jqJS';
TextInput233205[67]= '8r3JbD5n';
TextInput233205[68]= '76915i84';
TextInput233205[69]= '1DynPGoQ';
TextInput233205[70]= 'fJHlFdK4';
TextInput233205[71]= '1hQTX7Wm';
TextInput233205[72]= '7PlYT7Mc';
TextInput233205[73]= '823ZucHR';
TextInput233205[74]= 'su3ZsK4o';
TextInput233205[75]= 'X4Kp933M';
TextInput233205[76]= 'OK10b3gc';
TextInput233205[77]= '6R99lw1x';
TextInput233205[78]= 'KRntGo0Y';
TextInput233205[79]= '9nR5HTVV';
TextInput233205[80]= 'ByCRQ6Jg';
TextInput233205[81]= '0Bl5n58Q';
TextInput233205[82]= '8uxaP1Wh';
TextInput233205[83]= 'Vy8t9yz7';
TextInput233205[84]= 'e673PLMk';
TextInput233205[85]= 'Ghn4lIv7';
TextInput233205[86]= 'A65fw299';
TextInput233205[87]= 'k3yg406q';
TextInput233205[88]= '7ft8Uo02';
TextInput233205[89]= '9v021U4M';
TextInput233205[90]= '21op5R16';
TextInput233205[91]= 'iqu6NDHM';
TextInput233205[92]= 'gdYw3xp8';
TextInput233205[93]= 'C1N5j4uO';
TextInput233205[94]= '3QlLV60H';
TextInput233205[95]= '112D443F';
TextInput233205[96]= 'SrYl1Wfo';
TextInput233205[97]= 'SrYl1Wfo';
TextInput233205[98]= 'q8hsvLMu';
TextInput233205[99]= 'l6r11Tvd';

// set up the random seed and value
day = new Date;
seed = day.getTime();
document.write(TextInput233205[parseInt(((seed - (parseInt(seed/1000,10) * 1000)) /10) /100 * TotalTextInput233205+1,10)]);

//-->
</script></span></font></td>
</tr>
</table>

<!--webbot bot="Include" i-checksum="39637" endspan --></div>
</td>
</tr>
<tr>
<td width="100%">
<b><font size="2">Password Is Changed Every Time
Page Is Accessed</font></b></td>
</tr>
</table>
</center>
</div>
</div>
</td>
</tr>
</table>
</center>
</div>
</td>
</tr>
</table>
</center>
</div>
</td>
</tr>



<p>
</p>


<p>&nbsp;</p>
<table border="1" width="960" bgcolor="#336699">
<tr>
<td width="100%">
<p align="center"><b><font color="#FFFFFF">User</font></b></td>
</tr>
</table>
<div align="justify">
<table border="1" width="960" height="154" bordercolordark="#336699" bordercolorlight="#336699">
<tr>
<td width="50%" height="148">
<p style="word-spacing: 0; line-height: 100%; margin-top: 0; margin-bottom: 0" align="justify"></a> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp; <input type="button"
value="Generate E-Mail"
onclick="parent.location='mailto:Test@test.com?subject=Password Reset&amp;body=This E-mail is to inform you that your password has been reset.%0d%0aUser Name :%0d%0aUser ID :%0d%0aNew password :%0d%0aTicket Number :%0d%0aThank you.'">&nbsp;</p>
<p style="word-spacing: 0; line-height: 100%; margin-top: 0; margin-bottom: 0" align="justify">&nbsp;</p>


What I need is for the new password to be added or generated in the e-mail.

Thanks



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum