I want to call the calc_URL function and send the EMail in a single click or onsubmit (5 lines from bottom), maybe by eliminating the form's "action" routine and adding an additional function for the EMail.
FrontPage Extensions and Sharepoint Administration are both installed and functioning. SMTP server IP address, etc. are all configured. Using Outlook Express, I can send/receive EMail to the server, etc. There are no problems identified in the Event logs.
I have already looked at hotscripts.com without any success. Can anyone help?
[code]
<html>
<head>
<title>Photo 0001</title>
<meta name="description" content="Photo 0001">
<style type="text/css">
.style1 {
text-align: center;
}
.style2 {
margin-top: 0;
margin-bottom: 0;
}
</style>
<base target="_self">
<SCRIPT LANGUAGE="JAVASCRIPT">
<!--
<!-- Begin
function Check(chk){
var flag = document.orderform.Check_A
ll.value==
"Check All";
for (i = 0; i < chk.length; i++){
chk[i].checked = flag;
}
document.orderform.Check_A
ll.value = flag?"Uncheck All":"Check All";
calcTotal();
}
function countChecked(chk){
var counter = 0;
for (i = 0; i<chk.length; i++){
if(chk[i].checked) counter++;
}
return counter;
}
function calcTotal(){
var qty = countChecked(document.orde
rform.phot
o);
var total = 0;
switch(qty){
case 12: total = 25; break;
default: {
var set5 = Math.floor(qty / 5);
var rem = qty % 5;
total = (set5*12.5) + (rem*3.5);
}
}
document.getElementById('t
otal').inn
erHTML = '$' + total.toFixed(2); {
dval = total
}
}
window.onload = function(){
var obj = document.orderform.photo;
for(var i=0; i<obj.length; i++){
obj[i].onclick = calcTotal;
}
}
function calcURL(){
var href = '
https:\/\/www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=mmw_000011%40yahoo%2ecom&item_name=FSSet1&amount=' + dval +'&shipping=2.47&n
o_note=1&a
mp;currenc
y_code=USD
&lc=US
&bn=PP
%2dBuyNowB
F&char
set=UTF%2d
8';
alert(href);
window.open(href);
}
// End -->
</SCRIPT>
</head>
<body style="background-color: #FFFFFF">
<form name="orderform" method="post" action="--WEBBOT-SELF--">
<!--webbot bot="SaveResults" U-File="_private/Pending.h
tm" S-Format="HTML/PRE" S-Label-Fields="TRUE" B-Reverse-Chronology="FALS
E" S-Date-Format="%m/%d/%Y" S-Time-Format="%H:%M" S-Builtin-Fields="Date Time" S-Form-Fields="Subject CusEMail CusName photo photo photo photo photo photo photo photo photo photo photo photo " startspan --><input TYPE="hidden" NAME="VTI-GROUP" VALUE="0"><!--webbot bot="SaveResults" i-checksum="43374" endspan -->
<input name="NextURL" type="hidden" value="FS002.asp">
<input name="Subject" type="hidden" value="Sale">
<input name="CusEMail" type="hidden" value="Email">
<input name="CusName" type="hidden" value="Name">
<div class="style1">
<table style="width: 80%" align="center">
<tr>
<td colspan="6" class="style3">Select photos & click "Buy" to order: $3.50 each,$12.50 for five, $25.00 for page.</td>
</tr>
<tr>
<td style="width: 400px" class="style1"><img src="images/FS0002.jpg" width="150" height="150" alt="FS0002"> </td>
<td style="width: 150px" class="style1">FS0002<br><
input type="checkbox" name="photo" value="FS0002"> </td>
<td style="width: 400px" class="style1"><img src="images/FS0006.jpg" width="150" height="150" alt="FS0006"> </td>
<td style="width: 150px" class="style1">FS0006<br><
input type="checkbox" name="photo" value="FS0006"> </td>
<td style="width: 400px" class="style1"><img src="images/FS0010.jpg" width="150" height="150" alt="FS0010"> </td>
<td style="width: 150px" class="style1">FS0010<br><
input type="checkbox" name="photo" value="FS0010"> </td>
</tr>
<tr>
<td style="width: 400px" class="style1"><img src="images/FS0003.jpg" width="150" height="150" alt="FS0003"> </td>
<td style="width: 150px" class="style1">FS0003<br><
input type="checkbox" name="photo" value="FS0003"> </td>
<td style="width: 400px" class="style1"><img src="images/FS0007.jpg" width="150" height="150" alt="FS0007"> </td>
<td style="width: 150px" class="style1">FS0007<br><
input type="checkbox" name="photo" value="FS0007"> </td>
<td style="width: 400px" class="style1"><img src="images/FS0011.jpg" width="150" height="150" alt="FS0011"> </td>
<td style="width: 150px" class="style1">FS0011<br><
input type="checkbox" name="photo" value="FS0011"> </td>
</tr>
<tr>
<td style="width: 400px" class="style1"><img src="images/FS0004.jpg" width="150" height="150" alt="FS0004"> </td>
<td style="width: 150px" class="style1">FS0004<br><
input type="checkbox" name="photo" value="FS0004"> </td>
<td style="width: 400px" class="style1"><img src="images/FS0008.jpg" width="150" height="150" alt="FS0008"> </td>
<td style="width: 150px" class="style1">FS0008<br><
input type="checkbox" name="photo" value="FS0008"> </td>
<td style="width: 400px" class="style1"><img src="images/FS0012.jpg" width="150" height="150" alt="FS0012"> </td>
<td style="width: 150px" class="style1">FS0012<br><
input type="checkbox" name="photo" value="FS0012"> </td>
</tr>
<tr>
<td style="width: 400px" class="style1"><img src="images/FS0005.jpg" width="150" height="150" alt="FS0004"> </td>
<td style="width: 150px" class="style1">FS0005<br><
input type="checkbox" name="photo" value="FS0005"> </td>
<td style="width: 400px" class="style1"><img src="images/FS0009.jpg" width="150" height="150" alt="FS0004"> </td>
<td style="width: 150px" class="style1">FS0009<br><
input type="checkbox" name="photo" value="FS0009"> </td>
<td style="width: 400px" class="style1"><img src="images/FS0013.jpg" width="150" height="150" alt="FS0004"> </td>
<td style="width: 150px" class="style1">FS0013<br><
input type="checkbox" name="photo" value="FS0013"> </td>
</tr>
<tr>
<td colspan="6">
<input type="button" name="Check_All" value="Check All" onClick="Check(document.or
derform.ph
oto)"></td
>
<td class="style4"> </td>
</tr>
<tr>
<td colspan="5" class="style2">Total: 
;
</td>
<td id="total" style="width: 150px">
</td>
</tr>
<tr>
<td colspan="5" class="style6" style="height: 23px">
<a href="#" onclick="calcURL()">Buy Now</a>
</td>
</tr>
</table>
</div>
</form>
</body>
</html>