473,413 Members | 1,696 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,413 software developers and data experts.

Request.Form 'and' cdo.message

USING IIS 5.1, and Windows XP pro, the following form works on my system,
and I can use as many form elements as I wish, as long as all form elements
have the same name: "words", in this example.

Help -- why can`t I give each form element a different name? Any
suggestions will be gratefully appreciated.

Also,See example at very bottom of something that once worked on a remote
server, but doesn't on IIS 5.1, windows xp pro

<%@LANGUAGE="VBSCRIPT"%>
<%
Dim MyMail
Set MyMail = Server.CreateObject("CDO.Message")
MyMail.TextBody = Request.Form("words")
MyMail.From = "postmaster@localhost"
MyMail.To = "postmaster@localhost"
MyMail.Subject = "CDOSYS for Windows 2000/XP"
MyMail.Send()
Set MyMail = Nothing
%>

<HTML>
<FORM NAME="TextBody" METHOD="post" ACTION="gusto44444444.asp">
<P><BR>
<input type="text" NAME= "words" ID="words" COLS="28" ROWS="1">
Name <br>
<input type="text" NAME= "words" ID="words" COLS="28" ROWS="1">
<SPAN CLASS="book_antigua">E-Mail</SPAN><BR CLEAR="all">
<input type="text" name= "words" id="words" cols="28" rows="1">
Phone</P>
<BR>

<TEXTAREA NAME = "words" ID="words" COLS="18" ROWS="2"
wrap="VIRTUAL"></TEXTAREA>
<SPAN CLASS="book_antigua">Write Here </SPAN><BR CLEAR="all">
<P>
<INPUT TYPE="submit" NAME="Submit" VALUE="Submit, e-mail required"
ALIGN="DEFAULT">
<input type="reset" name="Reset" value="Reset">
</P>
<P>
</P>
<P>

</P>
</FORM>
<%
dim words
words=Request.Form("words")
If words<>"" Then
Response.Write("Thanks " & words & "!<br />")
Response.Write("We'll respond soon")
End If
%>


EXAMPLE AT BOTTOM -- WORKED IN PAST

BUT NOT NOW

Dim myMail
Set myMail = Server.CreateObject("CDONTS.NewMail")

Request.Form("email1")
Request.Form("name")
Request.Form("phone")
Request.Form("words")


May 10 '06 #1
4 4834
You can name your form fields whatever you want, and then access them by
Request.Form("nameOfInput")

MyMail.TextBody = Request.Form("input1") & vbCrLf & Request.Form("input2")

Ray at work

"whyyyy" <wh****@discussions.microsoft.com> wrote in message
news:10**********************************@microsof t.com...
USING IIS 5.1, and Windows XP pro, the following form works on my system,
and I can use as many form elements as I wish, as long as all form
elements
have the same name: "words", in this example.

Help -- why can`t I give each form element a different name? Any
suggestions will be gratefully appreciated.

Also,See example at very bottom of something that once worked on a remote
server, but doesn't on IIS 5.1, windows xp pro

<%@LANGUAGE="VBSCRIPT"%>
<%
Dim MyMail
Set MyMail = Server.CreateObject("CDO.Message")
MyMail.TextBody = Request.Form("words")
MyMail.From = "postmaster@localhost"
MyMail.To = "postmaster@localhost"
MyMail.Subject = "CDOSYS for Windows 2000/XP"
MyMail.Send()
Set MyMail = Nothing
%>

May 10 '06 #2
You're directly assigning the entire message body, the values of
request.form("words")

Why don't you do something like:

MessageBody = Request.Form("email1") & vbCrLf & _
Request.Form("name") & vbCrLf & _
Request.Form("phone") & vbCrLf & _
Request.Form("words")

....

MyMail.TextBody = MessageBody

The example you have at the bottom could never have worked. All you do is
create the object and then type out Request.Form("...")... this should yield
a type mismatch error or something.


"whyyyy" <wh****@discussions.microsoft.com> wrote in message
news:10**********************************@microsof t.com...
USING IIS 5.1, and Windows XP pro, the following form works on my system,
and I can use as many form elements as I wish, as long as all form
elements
have the same name: "words", in this example.

Help -- why can`t I give each form element a different name? Any
suggestions will be gratefully appreciated.

Also,See example at very bottom of something that once worked on a remote
server, but doesn't on IIS 5.1, windows xp pro

<%@LANGUAGE="VBSCRIPT"%>
<%
Dim MyMail
Set MyMail = Server.CreateObject("CDO.Message")
MyMail.TextBody = Request.Form("words")
MyMail.From = "postmaster@localhost"
MyMail.To = "postmaster@localhost"
MyMail.Subject = "CDOSYS for Windows 2000/XP"
MyMail.Send()
Set MyMail = Nothing
%>

<HTML>
<FORM NAME="TextBody" METHOD="post" ACTION="gusto44444444.asp">
<P><BR>
<input type="text" NAME= "words" ID="words" COLS="28" ROWS="1">
Name <br>
<input type="text" NAME= "words" ID="words" COLS="28" ROWS="1">
<SPAN CLASS="book_antigua">E-Mail</SPAN><BR CLEAR="all">
<input type="text" name= "words" id="words" cols="28" rows="1">
Phone</P>
<BR>

<TEXTAREA NAME = "words" ID="words" COLS="18" ROWS="2"
wrap="VIRTUAL"></TEXTAREA>
<SPAN CLASS="book_antigua">Write Here </SPAN><BR CLEAR="all">
<P>
<INPUT TYPE="submit" NAME="Submit" VALUE="Submit, e-mail
required"
ALIGN="DEFAULT">
<input type="reset" name="Reset" value="Reset">
</P>
<P>
</P>
<P>

</P>
</FORM>
<%
dim words
words=Request.Form("words")
If words<>"" Then
Response.Write("Thanks " & words & "!<br />")
Response.Write("We'll respond soon")
End If
%>


EXAMPLE AT BOTTOM -- WORKED IN PAST

BUT NOT NOW

Dim myMail
Set myMail = Server.CreateObject("CDONTS.NewMail")

Request.Form("email1")
Request.Form("name")
Request.Form("phone")
Request.Form("words")


May 10 '06 #3

Many thanks, Ray

I`ll let you know how it works

& vbCrLf something new for me, as is just about everything

AL

"Ray Costanzo [MVP]" wrote:
You can name your form fields whatever you want, and then access them by
Request.Form("nameOfInput")

MyMail.TextBody = Request.Form("input1") & vbCrLf & Request.Form("input2")

Ray at work

"whyyyy" <wh****@discussions.microsoft.com> wrote in message
news:10**********************************@microsof t.com...
USING IIS 5.1, and Windows XP pro, the following form works on my system,
and I can use as many form elements as I wish, as long as all form
elements
have the same name: "words", in this example.

Help -- why can`t I give each form element a different name? Any
suggestions will be gratefully appreciated.

Also,See example at very bottom of something that once worked on a remote
server, but doesn't on IIS 5.1, windows xp pro

<%@LANGUAGE="VBSCRIPT"%>
<%
Dim MyMail
Set MyMail = Server.CreateObject("CDO.Message")
MyMail.TextBody = Request.Form("words")
MyMail.From = "postmaster@localhost"
MyMail.To = "postmaster@localhost"
MyMail.Subject = "CDOSYS for Windows 2000/XP"
MyMail.Send()
Set MyMail = Nothing
%>


May 10 '06 #4
and thanks Aaron

"Aaron Bertrand [SQL Server MVP]" wrote:
You're directly assigning the entire message body, the values of
request.form("words")

Why don't you do something like:

MessageBody = Request.Form("email1") & vbCrLf & _
Request.Form("name") & vbCrLf & _
Request.Form("phone") & vbCrLf & _
Request.Form("words")

....

MyMail.TextBody = MessageBody

The example you have at the bottom could never have worked. All you do is
create the object and then type out Request.Form("...")... this should yield
a type mismatch error or something.


"whyyyy" <wh****@discussions.microsoft.com> wrote in message
news:10**********************************@microsof t.com...
USING IIS 5.1, and Windows XP pro, the following form works on my system,
and I can use as many form elements as I wish, as long as all form
elements
have the same name: "words", in this example.

Help -- why can`t I give each form element a different name? Any
suggestions will be gratefully appreciated.

Also,See example at very bottom of something that once worked on a remote
server, but doesn't on IIS 5.1, windows xp pro

<%@LANGUAGE="VBSCRIPT"%>
<%
Dim MyMail
Set MyMail = Server.CreateObject("CDO.Message")
MyMail.TextBody = Request.Form("words")
MyMail.From = "postmaster@localhost"
MyMail.To = "postmaster@localhost"
MyMail.Subject = "CDOSYS for Windows 2000/XP"
MyMail.Send()
Set MyMail = Nothing
%>

<HTML>
<FORM NAME="TextBody" METHOD="post" ACTION="gusto44444444.asp">
<P><BR>
<input type="text" NAME= "words" ID="words" COLS="28" ROWS="1">
Name <br>
<input type="text" NAME= "words" ID="words" COLS="28" ROWS="1">
<SPAN CLASS="book_antigua">E-Mail</SPAN><BR CLEAR="all">
<input type="text" name= "words" id="words" cols="28" rows="1">
Phone</P>
<BR>

<TEXTAREA NAME = "words" ID="words" COLS="18" ROWS="2"
wrap="VIRTUAL"></TEXTAREA>
<SPAN CLASS="book_antigua">Write Here </SPAN><BR CLEAR="all">
<P>
<INPUT TYPE="submit" NAME="Submit" VALUE="Submit, e-mail
required"
ALIGN="DEFAULT">
<input type="reset" name="Reset" value="Reset">
</P>
<P>
</P>
<P>

</P>
</FORM>
<%
dim words
words=Request.Form("words")
If words<>"" Then
Response.Write("Thanks " & words & "!<br />")
Response.Write("We'll respond soon")
End If
%>


EXAMPLE AT BOTTOM -- WORKED IN PAST

BUT NOT NOW

Dim myMail
Set myMail = Server.CreateObject("CDONTS.NewMail")

Request.Form("email1")
Request.Form("name")
Request.Form("phone")
Request.Form("words")



May 10 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: ThisIsMe | last post by:
I am using this php email form and it seems to work. But I would like for the option for attn$ Webmaster to go to a different email address than the mymail$ Please be Kind to us newbies... can...
6
by: Christopher Brandsdal | last post by:
Hi! I get an error when I run my code Is there any other way to get te information from my form? Heres the error I get and the code beneath. Line 120 is market with ''''''''''''Line...
5
by: Wayne Wengert | last post by:
I am trying to use Request.Form to differentiate between when a page containing a form is first loaded and when it is reloaded as a result of the user clicking on the Submit button. Things are not...
1
by: Matt | last post by:
My problem is when the user click the submit button, it will launch another new window for the request page. I want to confirm we cannot use JavaScript open window functions to open a request page?...
4
by: Paxton | last post by:
At the risk of being told "If it ain't broke, don't fix it", my code works, but is ugly. Part of the admin site I'm working on at the moment includes a facility for users to enter Formulations...
5
by: Jack | last post by:
Hi, I am trying to get a thorough understanding of a code where a addition or deletion of records can be done from a list of records. For addition part of the form, data is being obtained from set...
7
by: eric.goforth | last post by:
Hello, I'm working with a classic asp page that calls another classic asp page. The html in my calling page looks like: <form method="post"...
4
by: Michael Kujawa | last post by:
I am using the following to create an SQL statement using the names and values from request.form. The loop goes through each item in request.form The issue comes in having an additional "and" at...
0
by: buntyindia | last post by:
Hi, I have a very strange problem with my application. I have developed it using Struts. I have a TextBox With Some fixed value in it and on Submit iam passing it to another page. <html:form...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.