close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Quotation form

Thread began 4/02/2012 10:00 am by john70964 | Last modified 4/18/2012 2:07 pm by john70964 | 2418 views | 19 replies


Well I seem to have made a little progress.

I now have the form showing the correct information and the email sends OK but
None of the information arrives, a blank email and the page does not redirect.

I am attaching the code maybe you can spot my mistake(s)

<!--#include file="Connections/xxxx.asp" -->
Dim rsQuotationGen2
Dim rsQuotationGen2_cmd
Dim rsQuotationGen2_numRows

Set rsQuotationGen2_cmd = Server.CreateObject ("ADODB.Command")
rsQuotationGen2_cmd.ActiveConnection = MM_connLepage_STRING
rsQuotationGen2_cmd.CommandText = "SELECT * FROM Quote_Generation2 ORDER BY GenID ASC"
rsQuotationGen2_cmd.Prepared = true

Set rsQuotationGen2 = rsQuotationGen2_cmd.Execute
rsQuotationGen2_numRows = 0
Dim Repeat1__numRows
Dim Repeat1__index

Repeat1__numRows = 30
Repeat1__index = 0
rsQuotationGen2_numRows = rsQuotationGen2_numRows + Repeat1__numRows
<!--#include file="WA_Universal_Email/CDOSYS_VB.asp" -->
<!--#include file="WA_Universal_Email/MailFormatting_VB.asp" -->
function WA_Universal_Email_1_SendMail(RecipientEmail)
dim MailObject, MailAttachments, MailBCC, MailCC, MailTo, MailBodyFormat, MailBody, MailImportance, MailFrom, MailSubject
MailAttachments = ""
MailBCC = ""
MailCC = ""
MailTo = ""
MailBodyFormat = ""
MailBody = ""
MailImportance = ""
MailFrom = "JH|WA|"
MailSubject = "Quotation"

'Global Variables
gAddBCC = ""
gAddCC = ""
gAddRecipient = ""
gBodyFormat = ""
gSetImportance = ""

set WA_MailObject = WAUE_Definition("","25","","","zzzzzz","1")

if (RecipientEmail <> "") then
set WA_MailObject = WAUE_AddRecipient(WA_MailObject,RecipientEmail)
MailTo = gAddRecipient
gAddRecipient = ""
'To Entries
end if

'Attachment Entries

'BCC Entries
MailBCC = gAddBCC

'CC Entries
MailCC = gAddCC

'Character Set
set WA_MailObject = WAUE_SetCharset(WA_MailObject,"ISO-8859-1")

'Body Format
set WA_MailObject = WAUE_BodyFormat(WA_MailObject,0)
MailBodyFormat = gBodyFormat

'Set Importance
set WA_MailObject = WAUE_SetImportance(WA_MailObject,"3")
MailImportance = gSetImportance

'Start Mail Body
'End Mail Body

set WA_MailObject = WAUE_SendMail(WA_MailObject,MailAttachments,MailBCC,MailCC,MailTo,MailImportance,MailFrom,MailSubject,MailBody)

set WA_MailObject = nothing
end function
if ((Request.ServerVariables("Request_Method") = "POST")) then
'WA Universal Email object="CDOSYS"
'Send Loop Once Per Entry

'Send Mail All Entries
if (""<>"") then
end if
end if
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns="">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<link href="file:///D|/AA_Websites/xxxx-Bimed/styles.css" rel="stylesheet" type="text/css" />
<link href="styles.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
function MM_validateForm() { //v4.0
if (document.getElementById){
var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=document.getElementById(args[i]);
if (val) {; if ((val=val.value)!="") {
if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\n';
} else if (test!='R') { num = parseFloat(val);
if (isNaN(val)) errors+='- '+nm+' must contain a number.\n';
if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
min=test.substring(8,p); max=test.substring(p+1);
if (num<min || max<num) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';
} } } else if (test.charAt(0) == 'R') errors += '- '+nm+' is required.\n'; }
} if (errors) alert('The following error(s) occurred:\n'+errors);
document.MM_returnValue = (errors == '');
} }

<form id="form1" name="form1" method="post" action="">
<table width="900" border="1">
<td colspan="2" class="HeadingSmall"><div align="right">Your email address-&gt;</div></td>
<td colspan="2"><label>
<input name="email" type="text" id="email" onblur="MM_validateForm('email','','RisEmail');return document.MM_returnValue" size="30" />
<td width="22" class="HeadingSmall">ID</td>
<td width="100" class="HeadingSmall">Code</td>
<td width="32" class="HeadingSmall">Size</td>
<td width="58" class="HeadingSmall">TD mm</td>
<td width="56" class="HeadingSmall">TL mm</td>
<td width="73" class="HeadingSmall">SW1 mm</td>
<td width="73" class="HeadingSmall">SW2 mm</td>
<td width="82" class="HeadingSmall">MaxH mm</td>
<td width="82" class="HeadingSmall">MaxD mm</td>
<td width="98" class="HeadingSmall">ClampRange</td>
<td width="104" class="HeadingSmall">Shield Range </td>
<td width="51" class="HeadingSmall">Quantity</td>
While ((Repeat1__numRows <> 0) AND (NOT rsQuotationGen2.EOF))
<td class="Text14"><%=(rsQuotationGen2.Fields.Item("GenID").Value)%></td>
<td class="Text14"><%=(rsQuotationGen2.Fields.Item("Code").Value)%></td>
<td class="Text14"><%=(rsQuotationGen2.Fields.Item("Size").Value)%></td>
<td class="Text14"><%=(rsQuotationGen2.Fields.Item("TDmm").Value)%></td>
<td class="Text14"><%=(rsQuotationGen2.Fields.Item("TLmm").Value)%></td>
<td class="Text14"><%=(rsQuotationGen2.Fields.Item("SW1mm").Value)%></td>
<td class="Text14"><%=(rsQuotationGen2.Fields.Item("SW2mm").Value)%></td>
<td class="Text14"><%=(rsQuotationGen2.Fields.Item("MaxHmm").Value)%></td>
<td class="Text14"><%=(rsQuotationGen2.Fields.Item("MaxDmm").Value)%></td>
<td class="Text14"><%=(rsQuotationGen2.Fields.Item("ClampRange").Value)%></td>
<td class="Text14"><%=(rsQuotationGen2.Fields.Item("ShieldDiam").Value)%></td>
<input name="Quantity" type="text" id="Quantity" value="0" size="6" />
<input type="submit" name="email2" id="email2" value="Submit" />
<br />
Set rsQuotationGen2 = Nothing

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question





Ease of use


security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...