Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Ordering Form Elements in a cdonts form-mail scenario

Status
Not open for further replies.

jonohara

Technical User
Mar 26, 2000
53
GB
how can i control the order that form elements appear in the body of a cdonts created email.

i.e. The form elements on the html page are ordered but when they are passed into the email body, using the following script, the order seems random!

Some of the form elements are generated on the fly from a dataset, with a checkbox being included on the form for each record in the dataset.

Code:
<%
strBody = &quot;&quot;
FOR EACH item in request.form
 strBody = strBody & item & vbcrlf & request(item) & vbcrlf
NEXT

        Set objMail = Server.CreateObject(&quot;CDONTS.NewMail&quot;)
                objMail.From=&quot;website@xxxxx.co.uk&quot;
                objMail.To=&quot;jon@xxxxxxxxx.co.uk&quot;
                objMail.Subject=&quot;Website Enquiry&quot;
                objMail.Body=strBody
                objMail.importance=1
                objMail.Send
        Set objMail = nothing


response.redirect &quot;../home.asp?contentid=26&quot;
response.end
%>

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top