Hi
I am attempting to send an html email based on user selections. Page one offers a list of selections which can be selected, then submitted to page two which shows the consolidated result from page one. In the process of consolidating the result, I am also building the html string which needs to be emailed once the user chooses the final submit... (basically what is being emailed is exactly what is shown on the 2nd page less the buttons).
All this works fine except that I cannot get the email to be submitted on a button push, rather it is being emailed as soon as the page is loaded. I am sure I am missing something obvious, but any help would be appreciated...following is a shortened version of the code:
<html>
<head>
<script language="vbscript">
sub TestSend()
<%
Dim oSendMailer
Set oSendMailer = Server.CreateObject("CDONTS.NewMail")
oSendMailer.To = "aaa@aa.com"
oSendMailer.From = "bb@bb.com"
oSendMailer.Subject = htmlMess
oSendMailer.BodyFormat = 0
oSendMailer.MailFormat = 0
oSendMailer.Body="Test Message 1"
oSendMailer.Send
set oSendMailer = nothing
%>
end sub
</script>
</head>
<body>
<!-- code here which displays the results and builds the html string for the email-->
<form>
<input type="button" value="Click" onclick="call TestSend()">
</form>
</body>
</html>
I am attempting to send an html email based on user selections. Page one offers a list of selections which can be selected, then submitted to page two which shows the consolidated result from page one. In the process of consolidating the result, I am also building the html string which needs to be emailed once the user chooses the final submit... (basically what is being emailed is exactly what is shown on the 2nd page less the buttons).
All this works fine except that I cannot get the email to be submitted on a button push, rather it is being emailed as soon as the page is loaded. I am sure I am missing something obvious, but any help would be appreciated...following is a shortened version of the code:
<html>
<head>
<script language="vbscript">
sub TestSend()
<%
Dim oSendMailer
Set oSendMailer = Server.CreateObject("CDONTS.NewMail")
oSendMailer.To = "aaa@aa.com"
oSendMailer.From = "bb@bb.com"
oSendMailer.Subject = htmlMess
oSendMailer.BodyFormat = 0
oSendMailer.MailFormat = 0
oSendMailer.Body="Test Message 1"
oSendMailer.Send
set oSendMailer = nothing
%>
end sub
</script>
</head>
<body>
<!-- code here which displays the results and builds the html string for the email-->
<form>
<input type="button" value="Click" onclick="call TestSend()">
</form>
</body>
</html>