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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I pass form variables correctly to a CDONTS server object

Status
Not open for further replies.

rnowrang

IS-IT--Management
May 6, 2004
27
US
How can I pass form variables correctly to a CDONTS server object in the same document.

Can I assing two or more actions to one form? One action to add to database and another to send to an ASP file with the CDONTS object to send mail. If so what would be the correct syntax for the following code:

<form name="form1" method="POST" action="<%=MM_editAction%>">

Thanks.

 
Have you tried to post the form to a page that contains script to perform both actions? Like as follows

Page 1

--------------------------------
<form METHOD="post" ACTION="Process.asp">
To:&nbsp <input type="Text" name="To">
<input type="submit" value="Send">
</form>
-------------------------------

Page 2
-------------------------------
<%
dim sTo

sTo = Request.form("To")

Response.write sTo

%>
--------------------------

Basically now you can have the form completed and the information passed to a variable you can perform a variety of functions on. You could send it as an email and add it to a database.

Let me know if you need more code.

Cassidy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top