Email Database Region Results

S

swalt

I have a database results region. I'd like to add a form that will allow a
user to request more info (via email) on the results returned.
 
S

Stefan B Rusynko

Insert a column in the DBR table
In that column insert a link to another ASP page
(which will contain a form with the info request)
and
In the hyperlink add a parameter to identify the record involved to you when you get the email
(using some unique field (fldname below) from the DBR which identifies that record)

So in the cell the link would look like
<a href="theformpage.asp?ID=<%=FP_Field(rs, fldname)%>>Get Info</a>

On the receiving end, in the form add a hidden form field with that ID
<input type="hidden" name="ID" value="Request.QueryString("ID")>

--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
To find the best Newsgroup for FrontPage support see:
http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
_____________________________________________


| Sure could usse a bit of help on this one
|
| "swalt" wrote:
|
| > I have a database results region. I'd like to add a form that will allow a
| > user to request more info (via email) on the results returned.
 
S

swalt

OK the submit button returns no action. In other words click submit and
nothing. Page is .asp if renamed to .htm page submit button works but does
not include the info needed from the original DBR.

Help
 
D

David Berry

The page must be .asp for the server-side script to work. Can you post the
code for the page into a reply so we can see what's happening?


swalt said:
OK the submit button returns no action. In other words click submit and
nothing. Page is .asp if renamed to .htm page submit button works but does
not include the info needed from the original DBR.

Help

Stefan B Rusynko said:
Insert a column in the DBR table
In that column insert a link to another ASP page
(which will contain a form with the info request)
and
In the hyperlink add a parameter to identify the record involved to you
when you get the email
(using some unique field (fldname below) from the DBR which identifies
that record)

So in the cell the link would look like
<a href="theformpage.asp?ID=<%=FP_Field(rs, fldname)%>>Get Info</a>

On the receiving end, in the form add a hidden form field with that ID
<input type="hidden" name="ID" value="Request.QueryString("ID")>

--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
To find the best Newsgroup for FrontPage support see:
http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
_____________________________________________


| Sure could usse a bit of help on this one
|
| "swalt" wrote:
|
| > I have a database results region. I'd like to add a form that will
allow a
| > user to request more info (via email) on the results returned.
 
S

swalt

Thanks. Heres the code. Also the web is finishlineservices.biz. Take a look
it may help you understand what I am going for

<form method="POST" action="--WEBBOT-SELF--">
<!--webbot bot="SaveResults" S-Email-Format="TEXT/PRE"
S-Email-Address="(e-mail address removed)" B-Email-Label-Fields="TRUE"
S-Builtin-Fields --><p>
<input type="text" name="T1" size="20"></p>
<p><input type="text" name="T2" size="20"></p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p><input type="submit" value="Submit" name="B1"><input type="reset"
value="Reset" name="B2"></p>
<p> </p>
<input type="hidden" name="STOCKID" value="Request.QueryString("STOCKID")">
</form>
</BODY>
</HTML>

David Berry said:
The page must be .asp for the server-side script to work. Can you post the
code for the page into a reply so we can see what's happening?


swalt said:
OK the submit button returns no action. In other words click submit and
nothing. Page is .asp if renamed to .htm page submit button works but does
not include the info needed from the original DBR.

Help

Stefan B Rusynko said:
Insert a column in the DBR table
In that column insert a link to another ASP page
(which will contain a form with the info request)
and
In the hyperlink add a parameter to identify the record involved to you
when you get the email
(using some unique field (fldname below) from the DBR which identifies
that record)

So in the cell the link would look like
<a href="theformpage.asp?ID=<%=FP_Field(rs, fldname)%>>Get Info</a>

On the receiving end, in the form add a hidden form field with that ID
<input type="hidden" name="ID" value="Request.QueryString("ID")>

--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
To find the best Newsgroup for FrontPage support see:
http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
_____________________________________________


| Sure could usse a bit of help on this one
|
| "swalt" wrote:
|
| > I have a database results region. I'd like to add a form that will
allow a
| > user to request more info (via email) on the results returned.
 
D

David Berry

Ok. In the hidden field you're missing the ASP delimiters so the page
doesn't know how to interpret it. Change:

<input type="hidden" name="ID" value="Request.QueryString("ID")>

to

<input type="hidden" name="ID" value="<%=Request.QueryString("ID")%>">

This assumes that you're passing the ID from another page to this one.


swalt said:
Thanks. Heres the code. Also the web is finishlineservices.biz. Take a
look
it may help you understand what I am going for

<form method="POST" action="--WEBBOT-SELF--">
<!--webbot bot="SaveResults" S-Email-Format="TEXT/PRE"
S-Email-Address="(e-mail address removed)" B-Email-Label-Fields="TRUE"
S-Builtin-Fields --><p>
<input type="text" name="T1" size="20"></p>
<p><input type="text" name="T2" size="20"></p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p><input type="submit" value="Submit" name="B1"><input type="reset"
value="Reset" name="B2"></p>
<p> </p>
<input type="hidden" name="STOCKID"
value="Request.QueryString("STOCKID")">
</form>
</BODY>
</HTML>

David Berry said:
The page must be .asp for the server-side script to work. Can you post
the
code for the page into a reply so we can see what's happening?


swalt said:
OK the submit button returns no action. In other words click submit and
nothing. Page is .asp if renamed to .htm page submit button works but
does
not include the info needed from the original DBR.

Help

:

Insert a column in the DBR table
In that column insert a link to another ASP page
(which will contain a form with the info request)
and
In the hyperlink add a parameter to identify the record involved to
you
when you get the email
(using some unique field (fldname below) from the DBR which identifies
that record)

So in the cell the link would look like
<a href="theformpage.asp?ID=<%=FP_Field(rs, fldname)%>>Get Info</a>

On the receiving end, in the form add a hidden form field with that ID
<input type="hidden" name="ID" value="Request.QueryString("ID")>

--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
To find the best Newsgroup for FrontPage support see:

http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
_____________________________________________


| Sure could usse a bit of help on this one
|
| "swalt" wrote:
|
| > I have a database results region. I'd like to add a form that will
allow a
| > user to request more info (via email) on the results returned.
 
D

David Berry

Stefan, Couple syntax corrections. The hidden field and is missing <% %>.
and the hyperlink needs some quotes. It should read:

<a href="theformpage.asp?ID=<%=FP_Field(rs, fldname)%>">Get Info</a>

<input type="hidden" name="ID" value="<%=Request.QueryString("ID")%>">
 
S

Stefan B Rusynko

Thanks


--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
To find the best Newsgroup for FrontPage support see:
http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
_____________________________________________


| Stefan, Couple syntax corrections. The hidden field and is missing <% %>.
| and the hyperlink needs some quotes. It should read:
|
| <a href="theformpage.asp?ID=<%=FP_Field(rs, fldname)%>">Get Info</a>
|
| <input type="hidden" name="ID" value="<%=Request.QueryString("ID")%>">
|
|
|
| | > Insert a column in the DBR table
| > In that column insert a link to another ASP page
| > (which will contain a form with the info request)
| > and
| > In the hyperlink add a parameter to identify the record involved to you
| > when you get the email
| > (using some unique field (fldname below) from the DBR which identifies
| > that record)
| >
| > So in the cell the link would look like
| > <a href="theformpage.asp?ID=<%=FP_Field(rs, fldname)%>>Get Info</a>
| >
| > On the receiving end, in the form add a hidden form field with that ID
| > <input type="hidden" name="ID" value="Request.QueryString("ID")>
| >
| > --
| >
| > _____________________________________________
| > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| > "Warning - Using the F1 Key will not break anything!" (-;
| > To find the best Newsgroup for FrontPage support see:
| > http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
| > _____________________________________________
| >
| >
| > | > | Sure could usse a bit of help on this one
| > |
| > | "swalt" wrote:
| > |
| > | > I have a database results region. I'd like to add a form that will
| > allow a
| > | > user to request more info (via email) on the results returned.
| >
| >
|
|
 
S

swalt

Made changes. Published. The info request page clears out what was entered
(by end user) and does not send to email. site is
www.finishlineservices.biz. Renamed page to htm from asp it send to email but
will not carry the hidden field.
 
S

swalt

Made the changes. Still not working. The only way the page will send email is
when the page is saved as htm and not asp. But even so the hidden data does
not carry

David Berry said:
Ok. In the hidden field you're missing the ASP delimiters so the page
doesn't know how to interpret it. Change:

<input type="hidden" name="ID" value="Request.QueryString("ID")>

to

<input type="hidden" name="ID" value="<%=Request.QueryString("ID")%>">

This assumes that you're passing the ID from another page to this one.


swalt said:
Thanks. Heres the code. Also the web is finishlineservices.biz. Take a
look
it may help you understand what I am going for

<form method="POST" action="--WEBBOT-SELF--">
<!--webbot bot="SaveResults" S-Email-Format="TEXT/PRE"
S-Email-Address="(e-mail address removed)" B-Email-Label-Fields="TRUE"
S-Builtin-Fields --><p>
<input type="text" name="T1" size="20"></p>
<p><input type="text" name="T2" size="20"></p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p><input type="submit" value="Submit" name="B1"><input type="reset"
value="Reset" name="B2"></p>
<p> </p>
<input type="hidden" name="STOCKID"
value="Request.QueryString("STOCKID")">
</form>
</BODY>
</HTML>

David Berry said:
The page must be .asp for the server-side script to work. Can you post
the
code for the page into a reply so we can see what's happening?


OK the submit button returns no action. In other words click submit and
nothing. Page is .asp if renamed to .htm page submit button works but
does
not include the info needed from the original DBR.

Help

:

Insert a column in the DBR table
In that column insert a link to another ASP page
(which will contain a form with the info request)
and
In the hyperlink add a parameter to identify the record involved to
you
when you get the email
(using some unique field (fldname below) from the DBR which identifies
that record)

So in the cell the link would look like
<a href="theformpage.asp?ID=<%=FP_Field(rs, fldname)%>>Get Info</a>

On the receiving end, in the form add a hidden form field with that ID
<input type="hidden" name="ID" value="Request.QueryString("ID")>

--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
To find the best Newsgroup for FrontPage support see:

http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
_____________________________________________


| Sure could usse a bit of help on this one
|
| "swalt" wrote:
|
| > I have a database results region. I'd like to add a form that will
allow a
| > user to request more info (via email) on the results returned.
 
D

David Berry

The page MUST be a .asp page for this to work and you can NOT use the
FrontPage Forms handler to do this (it doesn't work with .asp pages).
You'll have to use all ASP code to send the email.

What page (exactly) is the one with the issue and what's the page that
passes the information? I looked at the site and it appears that you want
useddetails.asp to pass a STOCKID to new_page_2.htm when someone clicks "Get
Info". Is that correct? I don't see any hidden fields on new_page_2.htm

If so, here's what you need to do:

On useddetails.asp change the Get Info link to point to the .asp page with
the form

<a href="new_page_2.asp?STOCKID= .. <leave your code to retrieve the number>
... ">Get Info</a>

Then rename new_page_2.htm to new_page_2.asp

On new_page_2.asp remove ALL the FrontPage web bot code (FrontPage Forms
handler) and change the form tag to read:

<FORM METHOD="POST" ACTION="sendemail.asp">

Add back in the hidden field

<input type="hidden" name="ID" value="<%=Request.QueryString("STOCKID")%>">

Now create a NEW page called sendemail.asp. Switch to Code View and Delete
EVERYTHING there (all HTML code) and paste in this code:

<%
Dim iMsg
Dim iConf
Dim Flds
Dim strText

' set the CDOSYS configuration fields to use port 25 on the SMTP server
Const cdoSendUsingPort = 2

set iMsg = CreateObject("CDO.Message")
set iConf = CreateObject("CDO.Configuration")

Set Flds = iConf.Fields

With Flds
..Item("http://schemas.microsoft.com/cdo/configuration/sendusing") =
cdoSendUsingPort
..Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") =
"mail.finishlineservices.biz"
..Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout")
= 10
..Update
End With

strText = "Name: " & trim(Request.Form("Contact_FullName")) & vbCrLf
strText = strText & "Title: " & trim(Request.Form("Contact_Title")) & vbCrLf
strText = strText & "Organization: " &
trim(Request.Form("Contact_Organization")) & vbCrLf
strText = strText & "Work Phone: " & trim(Request.Form("Contact_WorkPhone"))
& vbCrLf
strText = strText & "Fax: " & trim(Request.Form("Contact_FAX")) & vbCrLf
strText = strText & "Email: " & trim(Request.Form("Contact_Email")) & vbCrLf
strText = strText & "URL: " & trim(Request.Form("Contact_URL")) & vbCrLf &
vbCrLf
strText = strText & "Please send more information about stock number" &
trim(Request.Form("ID")) & vbCrLf


With iMsg
Set .Configuration = iConf
..To = "(e-mail address removed)"
..From = trim(Request.Form("Contact_Email"))
..Subject = "Information Request"
..TextBody = strText
..Send
End With

Set iMsg = Nothing
Set iConf = Nothing
Set Flds = Nothing

Response.Redirect ("useddetails.asp?STOCKID=" & trim(Request.Form("ID")) )
%>

You can edit the context of the email as you'd like. NOTE: You'll need to
find out the correct name of your mail server from your web host. In the
code above I put mail.finishlineservices.biz but if that's not correct
you'll need to change it.

Finally, the last line above (response.redirect) is where they get sent
after the email is sent. In this example I pass them back to the
useddetails page. You can change this to wherever you want them to go.

When you're done you should have 3 pages:

useddetails.asp
new_page_2.asp
sendemail.asp


HTH






swalt said:
Made changes. Published. The info request page clears out what was entered
(by end user) and does not send to email. site is
www.finishlineservices.biz. Renamed page to htm from asp it send to email
but
will not carry the hidden field.
Stefan B Rusynko said:
Thanks


--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
To find the best Newsgroup for FrontPage support see:
http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
_____________________________________________


| Stefan, Couple syntax corrections. The hidden field and is missing <%
%>.
| and the hyperlink needs some quotes. It should read:
|
| <a href="theformpage.asp?ID=<%=FP_Field(rs, fldname)%>">Get Info</a>
|
| <input type="hidden" name="ID" value="<%=Request.QueryString("ID")%>">
|
|
|
| | > Insert a column in the DBR table
| > In that column insert a link to another ASP page
| > (which will contain a form with the info request)
| > and
| > In the hyperlink add a parameter to identify the record involved to
you
| > when you get the email
| > (using some unique field (fldname below) from the DBR which
identifies
| > that record)
| >
| > So in the cell the link would look like
| > <a href="theformpage.asp?ID=<%=FP_Field(rs, fldname)%>>Get Info</a>
| >
| > On the receiving end, in the form add a hidden form field with that
ID
| > <input type="hidden" name="ID" value="Request.QueryString("ID")>
| >
| > --
| >
| > _____________________________________________
| > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| > "Warning - Using the F1 Key will not break anything!" (-;
| > To find the best Newsgroup for FrontPage support see:
| >
http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
| > _____________________________________________
| >
| >
| > | > | Sure could usse a bit of help on this one
| > |
| > | "swalt" wrote:
| > |
| > | > I have a database results region. I'd like to add a form that
will
| > allow a
| > | > user to request more info (via email) on the results returned.
| >
| >
|
|
 
D

David Berry

See my other reply (farther down the thread)


swalt said:
Made the changes. Still not working. The only way the page will send email
is
when the page is saved as htm and not asp. But even so the hidden data
does
not carry

David Berry said:
Ok. In the hidden field you're missing the ASP delimiters so the page
doesn't know how to interpret it. Change:

<input type="hidden" name="ID" value="Request.QueryString("ID")>

to

<input type="hidden" name="ID" value="<%=Request.QueryString("ID")%>">

This assumes that you're passing the ID from another page to this one.


swalt said:
Thanks. Heres the code. Also the web is finishlineservices.biz. Take a
look
it may help you understand what I am going for

<form method="POST" action="--WEBBOT-SELF--">
<!--webbot bot="SaveResults" S-Email-Format="TEXT/PRE"
S-Email-Address="(e-mail address removed)" B-Email-Label-Fields="TRUE"
S-Builtin-Fields --><p>
<input type="text" name="T1" size="20"></p>
<p><input type="text" name="T2" size="20"></p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p><input type="submit" value="Submit" name="B1"><input type="reset"
value="Reset" name="B2"></p>
<p> </p>
<input type="hidden" name="STOCKID"
value="Request.QueryString("STOCKID")">
</form>
</BODY>
</HTML>

:

The page must be .asp for the server-side script to work. Can you
post
the
code for the page into a reply so we can see what's happening?


OK the submit button returns no action. In other words click submit
and
nothing. Page is .asp if renamed to .htm page submit button works
but
does
not include the info needed from the original DBR.

Help

:

Insert a column in the DBR table
In that column insert a link to another ASP page
(which will contain a form with the info request)
and
In the hyperlink add a parameter to identify the record involved to
you
when you get the email
(using some unique field (fldname below) from the DBR which
identifies
that record)

So in the cell the link would look like
<a href="theformpage.asp?ID=<%=FP_Field(rs, fldname)%>>Get Info</a>

On the receiving end, in the form add a hidden form field with that
ID
<input type="hidden" name="ID" value="Request.QueryString("ID")>

--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
To find the best Newsgroup for FrontPage support see:

http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
_____________________________________________


| Sure could usse a bit of help on this one
|
| "swalt" wrote:
|
| > I have a database results region. I'd like to add a form that
will
allow a
| > user to request more info (via email) on the results returned.
 
S

swalt

I also see the following code change. As far as I know it's not something I
changed.
<FORM METHOD="POST" ACTION="--WEBBOT-SELF--"
onSubmit="location.href='_derived/nortbots.htm';return false;"
webbot-onSubmit>
<!--webbot bot="SaveResults" s-label-fields="TRUE"
b-reverse-chronology="FALSE" s-email-format="TEXT/PRE"
s-email-address="(e-mail address removed)" b-email-label-fields="TRUE"
s-builtin-fields u-file="_private/formrslt.htm" s-format="HTML/DL" startspan
--><strong>[FrontPage Save Results Component]</strong><!--webbot
bot="SaveResults" endspan i-checksum="6561" --><P>


David Berry said:
Ok. In the hidden field you're missing the ASP delimiters so the page
doesn't know how to interpret it. Change:

<input type="hidden" name="ID" value="Request.QueryString("ID")>

to

<input type="hidden" name="ID" value="<%=Request.QueryString("ID")%>">

This assumes that you're passing the ID from another page to this one.


swalt said:
Thanks. Heres the code. Also the web is finishlineservices.biz. Take a
look
it may help you understand what I am going for

<form method="POST" action="--WEBBOT-SELF--">
<!--webbot bot="SaveResults" S-Email-Format="TEXT/PRE"
S-Email-Address="(e-mail address removed)" B-Email-Label-Fields="TRUE"
S-Builtin-Fields --><p>
<input type="text" name="T1" size="20"></p>
<p><input type="text" name="T2" size="20"></p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p><input type="submit" value="Submit" name="B1"><input type="reset"
value="Reset" name="B2"></p>
<p> </p>
<input type="hidden" name="STOCKID"
value="Request.QueryString("STOCKID")">
</form>
</BODY>
</HTML>

David Berry said:
The page must be .asp for the server-side script to work. Can you post
the
code for the page into a reply so we can see what's happening?


OK the submit button returns no action. In other words click submit and
nothing. Page is .asp if renamed to .htm page submit button works but
does
not include the info needed from the original DBR.

Help

:

Insert a column in the DBR table
In that column insert a link to another ASP page
(which will contain a form with the info request)
and
In the hyperlink add a parameter to identify the record involved to
you
when you get the email
(using some unique field (fldname below) from the DBR which identifies
that record)

So in the cell the link would look like
<a href="theformpage.asp?ID=<%=FP_Field(rs, fldname)%>>Get Info</a>

On the receiving end, in the form add a hidden form field with that ID
<input type="hidden" name="ID" value="Request.QueryString("ID")>

--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
To find the best Newsgroup for FrontPage support see:

http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
_____________________________________________


| Sure could usse a bit of help on this one
|
| "swalt" wrote:
|
| > I have a database results region. I'd like to add a form that will
allow a
| > user to request more info (via email) on the results returned.
 
D

David Berry

See my other reply.


swalt said:
I also see the following code change. As far as I know it's not something I
changed.
<FORM METHOD="POST" ACTION="--WEBBOT-SELF--"
onSubmit="location.href='_derived/nortbots.htm';return false;"
webbot-onSubmit>
<!--webbot bot="SaveResults" s-label-fields="TRUE"
b-reverse-chronology="FALSE" s-email-format="TEXT/PRE"
s-email-address="(e-mail address removed)" b-email-label-fields="TRUE"
s-builtin-fields u-file="_private/formrslt.htm" s-format="HTML/DL"
startspan
--><strong>[FrontPage Save Results Component]</strong><!--webbot
bot="SaveResults" endspan i-checksum="6561" --><P>


David Berry said:
Ok. In the hidden field you're missing the ASP delimiters so the page
doesn't know how to interpret it. Change:

<input type="hidden" name="ID" value="Request.QueryString("ID")>

to

<input type="hidden" name="ID" value="<%=Request.QueryString("ID")%>">

This assumes that you're passing the ID from another page to this one.


swalt said:
Thanks. Heres the code. Also the web is finishlineservices.biz. Take a
look
it may help you understand what I am going for

<form method="POST" action="--WEBBOT-SELF--">
<!--webbot bot="SaveResults" S-Email-Format="TEXT/PRE"
S-Email-Address="(e-mail address removed)" B-Email-Label-Fields="TRUE"
S-Builtin-Fields --><p>
<input type="text" name="T1" size="20"></p>
<p><input type="text" name="T2" size="20"></p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p><input type="submit" value="Submit" name="B1"><input type="reset"
value="Reset" name="B2"></p>
<p> </p>
<input type="hidden" name="STOCKID"
value="Request.QueryString("STOCKID")">
</form>
</BODY>
</HTML>

:

The page must be .asp for the server-side script to work. Can you
post
the
code for the page into a reply so we can see what's happening?


OK the submit button returns no action. In other words click submit
and
nothing. Page is .asp if renamed to .htm page submit button works
but
does
not include the info needed from the original DBR.

Help

:

Insert a column in the DBR table
In that column insert a link to another ASP page
(which will contain a form with the info request)
and
In the hyperlink add a parameter to identify the record involved to
you
when you get the email
(using some unique field (fldname below) from the DBR which
identifies
that record)

So in the cell the link would look like
<a href="theformpage.asp?ID=<%=FP_Field(rs, fldname)%>>Get Info</a>

On the receiving end, in the form add a hidden form field with that
ID
<input type="hidden" name="ID" value="Request.QueryString("ID")>

--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
To find the best Newsgroup for FrontPage support see:

http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
_____________________________________________


| Sure could usse a bit of help on this one
|
| "swalt" wrote:
|
| > I have a database results region. I'd like to add a form that
will
allow a
| > user to request more info (via email) on the results returned.
 
S

swalt

Made changes. Sendemail page will not display.

The page cannot be displayed
There is a problem with the page you are trying to reach and it cannot be
displayed.

--------------------------------------------------------------------------------

Please try the following:

Open the www.finishlineservices.biz home page, and then look for links to
the information you want.
Click the Refresh button, or try again later.

Click Search to look for information on the Internet.
You can also see a list of related sites.




HTTP 500 - Internal server error
Internet Explorer



David Berry said:
The page MUST be a .asp page for this to work and you can NOT use the
FrontPage Forms handler to do this (it doesn't work with .asp pages).
You'll have to use all ASP code to send the email.

What page (exactly) is the one with the issue and what's the page that
passes the information? I looked at the site and it appears that you want
useddetails.asp to pass a STOCKID to new_page_2.htm when someone clicks "Get
Info". Is that correct? I don't see any hidden fields on new_page_2.htm

If so, here's what you need to do:

On useddetails.asp change the Get Info link to point to the .asp page with
the form

<a href="new_page_2.asp?STOCKID= .. <leave your code to retrieve the number>
... ">Get Info</a>

Then rename new_page_2.htm to new_page_2.asp

On new_page_2.asp remove ALL the FrontPage web bot code (FrontPage Forms
handler) and change the form tag to read:

<FORM METHOD="POST" ACTION="sendemail.asp">

Add back in the hidden field

<input type="hidden" name="ID" value="<%=Request.QueryString("STOCKID")%>">

Now create a NEW page called sendemail.asp. Switch to Code View and Delete
EVERYTHING there (all HTML code) and paste in this code:

<%
Dim iMsg
Dim iConf
Dim Flds
Dim strText

' set the CDOSYS configuration fields to use port 25 on the SMTP server
Const cdoSendUsingPort = 2

set iMsg = CreateObject("CDO.Message")
set iConf = CreateObject("CDO.Configuration")

Set Flds = iConf.Fields

With Flds
..Item("http://schemas.microsoft.com/cdo/configuration/sendusing") =
cdoSendUsingPort
..Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") =
"mail.finishlineservices.biz"
..Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout")
= 10
..Update
End With

strText = "Name: " & trim(Request.Form("Contact_FullName")) & vbCrLf
strText = strText & "Title: " & trim(Request.Form("Contact_Title")) & vbCrLf
strText = strText & "Organization: " &
trim(Request.Form("Contact_Organization")) & vbCrLf
strText = strText & "Work Phone: " & trim(Request.Form("Contact_WorkPhone"))
& vbCrLf
strText = strText & "Fax: " & trim(Request.Form("Contact_FAX")) & vbCrLf
strText = strText & "Email: " & trim(Request.Form("Contact_Email")) & vbCrLf
strText = strText & "URL: " & trim(Request.Form("Contact_URL")) & vbCrLf &
vbCrLf
strText = strText & "Please send more information about stock number" &
trim(Request.Form("ID")) & vbCrLf


With iMsg
Set .Configuration = iConf
..To = "(e-mail address removed)"
..From = trim(Request.Form("Contact_Email"))
..Subject = "Information Request"
..TextBody = strText
..Send
End With

Set iMsg = Nothing
Set iConf = Nothing
Set Flds = Nothing

Response.Redirect ("useddetails.asp?STOCKID=" & trim(Request.Form("ID")) )
%>

You can edit the context of the email as you'd like. NOTE: You'll need to
find out the correct name of your mail server from your web host. In the
code above I put mail.finishlineservices.biz but if that's not correct
you'll need to change it.

Finally, the last line above (response.redirect) is where they get sent
after the email is sent. In this example I pass them back to the
useddetails page. You can change this to wherever you want them to go.

When you're done you should have 3 pages:

useddetails.asp
new_page_2.asp
sendemail.asp


HTH






swalt said:
Made changes. Published. The info request page clears out what was entered
(by end user) and does not send to email. site is
www.finishlineservices.biz. Renamed page to htm from asp it send to email
but
will not carry the hidden field.
Stefan B Rusynko said:
Thanks


--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
To find the best Newsgroup for FrontPage support see:
http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
_____________________________________________


| Stefan, Couple syntax corrections. The hidden field and is missing <%
%>.
| and the hyperlink needs some quotes. It should read:
|
| <a href="theformpage.asp?ID=<%=FP_Field(rs, fldname)%>">Get Info</a>
|
| <input type="hidden" name="ID" value="<%=Request.QueryString("ID")%>">
|
|
|
| | > Insert a column in the DBR table
| > In that column insert a link to another ASP page
| > (which will contain a form with the info request)
| > and
| > In the hyperlink add a parameter to identify the record involved to
you
| > when you get the email
| > (using some unique field (fldname below) from the DBR which
identifies
| > that record)
| >
| > So in the cell the link would look like
| > <a href="theformpage.asp?ID=<%=FP_Field(rs, fldname)%>>Get Info</a>
| >
| > On the receiving end, in the form add a hidden form field with that
ID
| > <input type="hidden" name="ID" value="Request.QueryString("ID")>
| >
| > --
| >
| > _____________________________________________
| > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| > "Warning - Using the F1 Key will not break anything!" (-;
| > To find the best Newsgroup for FrontPage support see:
| >
http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
| > _____________________________________________
| >
| >
| > | > | Sure could usse a bit of help on this one
| > |
| > | "swalt" wrote:
| > |
| > | > I have a database results region. I'd like to add a form that
will
| > allow a
| > | > user to request more info (via email) on the results returned.
| >
| >
|
|
 
D

David Berry

I see the error. That's a default error page not the real error message. In
Internet Explorer go to Tools, Internet Options, Advanced and uncheck Show
friendly HTTP error messages. Once you do that you'll see that the real
error is:

Microsoft VBScript compilation error '800a0400'

Expected statement

/Sendemail.asp, line 5
^

What's happening is that you have a > symbol in front of the Dim iMsg.
Delete it. I'm guessing that when you copied and pasted the code I gave you
from the post you included those little >> symbols that appear in a reply.
Make sure you don't have any of those. Also, watch out for line wrapping
with the code I posted (news readers have a bad habit of doing that). If
you see an error it may be because the line wrapped.

I'm attaching the code in Notepad that shouldn't line wrap. Open the
attachment and paste all that code into the page again (remove what you
have) to make sure it's all correct.

Yes all - I know we discourage news group attachments but OE drives me nuts
with line wraps. I'll take the abuse.

Dave



swalt said:
Made changes. Sendemail page will not display.

The page cannot be displayed
There is a problem with the page you are trying to reach and it cannot be
displayed.

--------------------------------------------------------------------------------

Please try the following:

Open the www.finishlineservices.biz home page, and then look for links to
the information you want.
Click the Refresh button, or try again later.

Click Search to look for information on the Internet.
You can also see a list of related sites.




HTTP 500 - Internal server error
Internet Explorer



David Berry said:
The page MUST be a .asp page for this to work and you can NOT use the
FrontPage Forms handler to do this (it doesn't work with .asp pages).
You'll have to use all ASP code to send the email.

What page (exactly) is the one with the issue and what's the page that
passes the information? I looked at the site and it appears that you
want
useddetails.asp to pass a STOCKID to new_page_2.htm when someone clicks
"Get
Info". Is that correct? I don't see any hidden fields on new_page_2.htm

If so, here's what you need to do:

On useddetails.asp change the Get Info link to point to the .asp page
with
the form

<a href="new_page_2.asp?STOCKID= .. <leave your code to retrieve the
number>
... ">Get Info</a>

Then rename new_page_2.htm to new_page_2.asp

On new_page_2.asp remove ALL the FrontPage web bot code (FrontPage Forms
handler) and change the form tag to read:

<FORM METHOD="POST" ACTION="sendemail.asp">

Add back in the hidden field

<input type="hidden" name="ID"
value="<%=Request.QueryString("STOCKID")%>">

Now create a NEW page called sendemail.asp. Switch to Code View and
Delete
EVERYTHING there (all HTML code) and paste in this code:

<%
Dim iMsg
Dim iConf
Dim Flds
Dim strText

' set the CDOSYS configuration fields to use port 25 on the SMTP server
Const cdoSendUsingPort = 2

set iMsg = CreateObject("CDO.Message")
set iConf = CreateObject("CDO.Configuration")

Set Flds = iConf.Fields

With Flds
..Item("http://schemas.microsoft.com/cdo/configuration/sendusing") =
cdoSendUsingPort
..Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") =
"mail.finishlineservices.biz"
..Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout")
= 10
..Update
End With

strText = "Name: " & trim(Request.Form("Contact_FullName")) & vbCrLf
strText = strText & "Title: " & trim(Request.Form("Contact_Title")) &
vbCrLf
strText = strText & "Organization: " &
trim(Request.Form("Contact_Organization")) & vbCrLf
strText = strText & "Work Phone: " &
trim(Request.Form("Contact_WorkPhone"))
& vbCrLf
strText = strText & "Fax: " & trim(Request.Form("Contact_FAX")) & vbCrLf
strText = strText & "Email: " & trim(Request.Form("Contact_Email")) &
vbCrLf
strText = strText & "URL: " & trim(Request.Form("Contact_URL")) & vbCrLf
&
vbCrLf
strText = strText & "Please send more information about stock number" &
trim(Request.Form("ID")) & vbCrLf


With iMsg
Set .Configuration = iConf
..To = "(e-mail address removed)"
..From = trim(Request.Form("Contact_Email"))
..Subject = "Information Request"
..TextBody = strText
..Send
End With

Set iMsg = Nothing
Set iConf = Nothing
Set Flds = Nothing

Response.Redirect ("useddetails.asp?STOCKID=" &
trim(Request.Form("ID")) )
%>

You can edit the context of the email as you'd like. NOTE: You'll need
to
find out the correct name of your mail server from your web host. In the
code above I put mail.finishlineservices.biz but if that's not correct
you'll need to change it.

Finally, the last line above (response.redirect) is where they get sent
after the email is sent. In this example I pass them back to the
useddetails page. You can change this to wherever you want them to go.

When you're done you should have 3 pages:

useddetails.asp
new_page_2.asp
sendemail.asp


HTH






swalt said:
Made changes. Published. The info request page clears out what was
entered
(by end user) and does not send to email. site is
www.finishlineservices.biz. Renamed page to htm from asp it send to
email
but
will not carry the hidden field.
:

Thanks


--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
To find the best Newsgroup for FrontPage support see:

http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
_____________________________________________


| Stefan, Couple syntax corrections. The hidden field and is missing
<%
%>.
| and the hyperlink needs some quotes. It should read:
|
| <a href="theformpage.asp?ID=<%=FP_Field(rs, fldname)%>">Get Info</a>
|
| <input type="hidden" name="ID"
value="<%=Request.QueryString("ID")%>">
|
|
|
| | > Insert a column in the DBR table
| > In that column insert a link to another ASP page
| > (which will contain a form with the info request)
| > and
| > In the hyperlink add a parameter to identify the record involved
to
you
| > when you get the email
| > (using some unique field (fldname below) from the DBR which
identifies
| > that record)
| >
| > So in the cell the link would look like
| > <a href="theformpage.asp?ID=<%=FP_Field(rs, fldname)%>>Get
Info</a>
| >
| > On the receiving end, in the form add a hidden form field with
that
ID
| > <input type="hidden" name="ID" value="Request.QueryString("ID")>
| >
| > --
| >
| > _____________________________________________
| > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| > "Warning - Using the F1 Key will not break anything!" (-;
| > To find the best Newsgroup for FrontPage support see:
| >
http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
| > _____________________________________________
| >
| >
| > | > | Sure could usse a bit of help on this one
| > |
| > | "swalt" wrote:
| > |
| > | > I have a database results region. I'd like to add a form that
will
| > allow a
| > | > user to request more info (via email) on the results returned.
| >
| >
|
|
 
S

swalt

Could not find your NotePad attachment. Did make your suggested changes. New
error message:
Microsoft VBScript compilation error '800a0400'

Expected statement

/sendemail.asp, line 35

To = "(e-mail address removed)"
^

David Berry said:
I see the error. That's a default error page not the real error message. In
Internet Explorer go to Tools, Internet Options, Advanced and uncheck Show
friendly HTTP error messages. Once you do that you'll see that the real
error is:

Microsoft VBScript compilation error '800a0400'

Expected statement

/Sendemail.asp, line 5
^

What's happening is that you have a > symbol in front of the Dim iMsg.
Delete it. I'm guessing that when you copied and pasted the code I gave you
from the post you included those little >> symbols that appear in a reply.
Make sure you don't have any of those. Also, watch out for line wrapping
with the code I posted (news readers have a bad habit of doing that). If
you see an error it may be because the line wrapped.

I'm attaching the code in Notepad that shouldn't line wrap. Open the
attachment and paste all that code into the page again (remove what you
have) to make sure it's all correct.

Yes all - I know we discourage news group attachments but OE drives me nuts
with line wraps. I'll take the abuse.

Dave



swalt said:
Made changes. Sendemail page will not display.

The page cannot be displayed
There is a problem with the page you are trying to reach and it cannot be
displayed.

--------------------------------------------------------------------------------

Please try the following:

Open the www.finishlineservices.biz home page, and then look for links to
the information you want.
Click the Refresh button, or try again later.

Click Search to look for information on the Internet.
You can also see a list of related sites.




HTTP 500 - Internal server error
Internet Explorer



David Berry said:
The page MUST be a .asp page for this to work and you can NOT use the
FrontPage Forms handler to do this (it doesn't work with .asp pages).
You'll have to use all ASP code to send the email.

What page (exactly) is the one with the issue and what's the page that
passes the information? I looked at the site and it appears that you
want
useddetails.asp to pass a STOCKID to new_page_2.htm when someone clicks
"Get
Info". Is that correct? I don't see any hidden fields on new_page_2.htm

If so, here's what you need to do:

On useddetails.asp change the Get Info link to point to the .asp page
with
the form

<a href="new_page_2.asp?STOCKID= .. <leave your code to retrieve the
number>
... ">Get Info</a>

Then rename new_page_2.htm to new_page_2.asp

On new_page_2.asp remove ALL the FrontPage web bot code (FrontPage Forms
handler) and change the form tag to read:

<FORM METHOD="POST" ACTION="sendemail.asp">

Add back in the hidden field

<input type="hidden" name="ID"
value="<%=Request.QueryString("STOCKID")%>">

Now create a NEW page called sendemail.asp. Switch to Code View and
Delete
EVERYTHING there (all HTML code) and paste in this code:

<%
Dim iMsg
Dim iConf
Dim Flds
Dim strText

' set the CDOSYS configuration fields to use port 25 on the SMTP server
Const cdoSendUsingPort = 2

set iMsg = CreateObject("CDO.Message")
set iConf = CreateObject("CDO.Configuration")

Set Flds = iConf.Fields

With Flds
..Item("http://schemas.microsoft.com/cdo/configuration/sendusing") =
cdoSendUsingPort
..Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") =
"mail.finishlineservices.biz"
..Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout")
= 10
..Update
End With

strText = "Name: " & trim(Request.Form("Contact_FullName")) & vbCrLf
strText = strText & "Title: " & trim(Request.Form("Contact_Title")) &
vbCrLf
strText = strText & "Organization: " &
trim(Request.Form("Contact_Organization")) & vbCrLf
strText = strText & "Work Phone: " &
trim(Request.Form("Contact_WorkPhone"))
& vbCrLf
strText = strText & "Fax: " & trim(Request.Form("Contact_FAX")) & vbCrLf
strText = strText & "Email: " & trim(Request.Form("Contact_Email")) &
vbCrLf
strText = strText & "URL: " & trim(Request.Form("Contact_URL")) & vbCrLf
&
vbCrLf
strText = strText & "Please send more information about stock number" &
trim(Request.Form("ID")) & vbCrLf


With iMsg
Set .Configuration = iConf
..To = "(e-mail address removed)"
..From = trim(Request.Form("Contact_Email"))
..Subject = "Information Request"
..TextBody = strText
..Send
End With

Set iMsg = Nothing
Set iConf = Nothing
Set Flds = Nothing

Response.Redirect ("useddetails.asp?STOCKID=" &
trim(Request.Form("ID")) )
%>

You can edit the context of the email as you'd like. NOTE: You'll need
to
find out the correct name of your mail server from your web host. In the
code above I put mail.finishlineservices.biz but if that's not correct
you'll need to change it.

Finally, the last line above (response.redirect) is where they get sent
after the email is sent. In this example I pass them back to the
useddetails page. You can change this to wherever you want them to go.

When you're done you should have 3 pages:

useddetails.asp
new_page_2.asp
sendemail.asp


HTH






Made changes. Published. The info request page clears out what was
entered
(by end user) and does not send to email. site is
www.finishlineservices.biz. Renamed page to htm from asp it send to
email
but
will not carry the hidden field.
:

Thanks


--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
To find the best Newsgroup for FrontPage support see:

http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
_____________________________________________


| Stefan, Couple syntax corrections. The hidden field and is missing
<%
%>.
| and the hyperlink needs some quotes. It should read:
|
| <a href="theformpage.asp?ID=<%=FP_Field(rs, fldname)%>">Get Info</a>
|
| <input type="hidden" name="ID"
value="<%=Request.QueryString("ID")%>">
|
|
|
| | > Insert a column in the DBR table
| > In that column insert a link to another ASP page
| > (which will contain a form with the info request)
| > and
| > In the hyperlink add a parameter to identify the record involved
to
you
| > when you get the email
| > (using some unique field (fldname below) from the DBR which
identifies
| > that record)
| >
| > So in the cell the link would look like
| > <a href="theformpage.asp?ID=<%=FP_Field(rs, fldname)%>>Get
Info</a>
| >
| > On the receiving end, in the form add a hidden form field with
that
ID
| > <input type="hidden" name="ID" value="Request.QueryString("ID")>
| >
| > --
| >
| > _____________________________________________
| > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| > "Warning - Using the F1 Key will not break anything!" (-;
| > To find the best Newsgroup for FrontPage support see:
| >
http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
| > _____________________________________________
| >
| >
| > | > | Sure could usse a bit of help on this one
| > |
| > | "swalt" wrote:
| > |
| > | > I have a database results region. I'd like to add a form that
will
| > allow a
| > | > user to request more info (via email) on the results returned.
| >
| >
|
|
 
D

David Berry

Should be a period before the TO.

I'm attaching it again


swalt said:
Could not find your NotePad attachment. Did make your suggested changes.
New
error message:
Microsoft VBScript compilation error '800a0400'

Expected statement

/sendemail.asp, line 35

To = "(e-mail address removed)"
^

David Berry said:
I see the error. That's a default error page not the real error message.
In
Internet Explorer go to Tools, Internet Options, Advanced and uncheck
Show
friendly HTTP error messages. Once you do that you'll see that the real
error is:

Microsoft VBScript compilation error '800a0400'

Expected statement

/Sendemail.asp, line 5
^

What's happening is that you have a > symbol in front of the Dim iMsg.
Delete it. I'm guessing that when you copied and pasted the code I gave
you
from the post you included those little >> symbols that appear in a
reply.
Make sure you don't have any of those. Also, watch out for line wrapping
with the code I posted (news readers have a bad habit of doing that). If
you see an error it may be because the line wrapped.

I'm attaching the code in Notepad that shouldn't line wrap. Open the
attachment and paste all that code into the page again (remove what you
have) to make sure it's all correct.

Yes all - I know we discourage news group attachments but OE drives me
nuts
with line wraps. I'll take the abuse.

Dave



swalt said:
Made changes. Sendemail page will not display.

The page cannot be displayed
There is a problem with the page you are trying to reach and it cannot
be
displayed.

--------------------------------------------------------------------------------

Please try the following:

Open the www.finishlineservices.biz home page, and then look for links
to
the information you want.
Click the Refresh button, or try again later.

Click Search to look for information on the Internet.
You can also see a list of related sites.




HTTP 500 - Internal server error
Internet Explorer



:

The page MUST be a .asp page for this to work and you can NOT use the
FrontPage Forms handler to do this (it doesn't work with .asp pages).
You'll have to use all ASP code to send the email.

What page (exactly) is the one with the issue and what's the page that
passes the information? I looked at the site and it appears that you
want
useddetails.asp to pass a STOCKID to new_page_2.htm when someone
clicks
"Get
Info". Is that correct? I don't see any hidden fields on
new_page_2.htm

If so, here's what you need to do:

On useddetails.asp change the Get Info link to point to the .asp page
with
the form

<a href="new_page_2.asp?STOCKID= .. <leave your code to retrieve the
number>
... ">Get Info</a>

Then rename new_page_2.htm to new_page_2.asp

On new_page_2.asp remove ALL the FrontPage web bot code (FrontPage
Forms
handler) and change the form tag to read:

<FORM METHOD="POST" ACTION="sendemail.asp">

Add back in the hidden field

<input type="hidden" name="ID"
value="<%=Request.QueryString("STOCKID")%>">

Now create a NEW page called sendemail.asp. Switch to Code View and
Delete
EVERYTHING there (all HTML code) and paste in this code:

<%
Dim iMsg
Dim iConf
Dim Flds
Dim strText

' set the CDOSYS configuration fields to use port 25 on the SMTP
server
Const cdoSendUsingPort = 2

set iMsg = CreateObject("CDO.Message")
set iConf = CreateObject("CDO.Configuration")

Set Flds = iConf.Fields

With Flds
..Item("http://schemas.microsoft.com/cdo/configuration/sendusing") =
cdoSendUsingPort
..Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") =
"mail.finishlineservices.biz"
..Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout")
= 10
..Update
End With

strText = "Name: " & trim(Request.Form("Contact_FullName")) & vbCrLf
strText = strText & "Title: " & trim(Request.Form("Contact_Title")) &
vbCrLf
strText = strText & "Organization: " &
trim(Request.Form("Contact_Organization")) & vbCrLf
strText = strText & "Work Phone: " &
trim(Request.Form("Contact_WorkPhone"))
& vbCrLf
strText = strText & "Fax: " & trim(Request.Form("Contact_FAX")) &
vbCrLf
strText = strText & "Email: " & trim(Request.Form("Contact_Email")) &
vbCrLf
strText = strText & "URL: " & trim(Request.Form("Contact_URL")) &
vbCrLf
&
vbCrLf
strText = strText & "Please send more information about stock number"
&
trim(Request.Form("ID")) & vbCrLf


With iMsg
Set .Configuration = iConf
..To = "(e-mail address removed)"
..From = trim(Request.Form("Contact_Email"))
..Subject = "Information Request"
..TextBody = strText
..Send
End With

Set iMsg = Nothing
Set iConf = Nothing
Set Flds = Nothing

Response.Redirect ("useddetails.asp?STOCKID=" &
trim(Request.Form("ID")) )
%>

You can edit the context of the email as you'd like. NOTE: You'll
need
to
find out the correct name of your mail server from your web host. In
the
code above I put mail.finishlineservices.biz but if that's not correct
you'll need to change it.

Finally, the last line above (response.redirect) is where they get
sent
after the email is sent. In this example I pass them back to the
useddetails page. You can change this to wherever you want them to
go.

When you're done you should have 3 pages:

useddetails.asp
new_page_2.asp
sendemail.asp


HTH






Made changes. Published. The info request page clears out what was
entered
(by end user) and does not send to email. site is
www.finishlineservices.biz. Renamed page to htm from asp it send to
email
but
will not carry the hidden field.
:

Thanks


--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
To find the best Newsgroup for FrontPage support see:

http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
_____________________________________________


| Stefan, Couple syntax corrections. The hidden field and is
missing
<%
%>.
| and the hyperlink needs some quotes. It should read:
|
| <a href="theformpage.asp?ID=<%=FP_Field(rs, fldname)%>">Get
Info</a>
|
| <input type="hidden" name="ID"
value="<%=Request.QueryString("ID")%>">
|
|
|
| | > Insert a column in the DBR table
| > In that column insert a link to another ASP page
| > (which will contain a form with the info request)
| > and
| > In the hyperlink add a parameter to identify the record
involved
to
you
| > when you get the email
| > (using some unique field (fldname below) from the DBR which
identifies
| > that record)
| >
| > So in the cell the link would look like
| > <a href="theformpage.asp?ID=<%=FP_Field(rs, fldname)%>>Get
Info</a>
| >
| > On the receiving end, in the form add a hidden form field with
that
ID
| > <input type="hidden" name="ID"
value="Request.QueryString("ID")>
| >
| > --
| >
| > _____________________________________________
| > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| > "Warning - Using the F1 Key will not break anything!" (-;
| > To find the best Newsgroup for FrontPage support see:
| >
http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
| > _____________________________________________
| >
| >
| > | > | Sure could usse a bit of help on this one
| > |
| > | "swalt" wrote:
| > |
| > | > I have a database results region. I'd like to add a form
that
will
| > allow a
| > | > user to request more info (via email) on the results
returned.
| >
| >
|
|
 
S

swalt

Thanks for all the help. Almost there. Forms seem to work but not sure what
is happening to the actual email. It never shows up. Suggestions?

David Berry said:
Should be a period before the TO.

I'm attaching it again


swalt said:
Could not find your NotePad attachment. Did make your suggested changes.
New
error message:
Microsoft VBScript compilation error '800a0400'

Expected statement

/sendemail.asp, line 35

To = "(e-mail address removed)"
^

David Berry said:
I see the error. That's a default error page not the real error message.
In
Internet Explorer go to Tools, Internet Options, Advanced and uncheck
Show
friendly HTTP error messages. Once you do that you'll see that the real
error is:

Microsoft VBScript compilation error '800a0400'

Expected statement

/Sendemail.asp, line 5

Dim iMsg
^

What's happening is that you have a > symbol in front of the Dim iMsg.
Delete it. I'm guessing that when you copied and pasted the code I gave
you
from the post you included those little >> symbols that appear in a
reply.
Make sure you don't have any of those. Also, watch out for line wrapping
with the code I posted (news readers have a bad habit of doing that). If
you see an error it may be because the line wrapped.

I'm attaching the code in Notepad that shouldn't line wrap. Open the
attachment and paste all that code into the page again (remove what you
have) to make sure it's all correct.

Yes all - I know we discourage news group attachments but OE drives me
nuts
with line wraps. I'll take the abuse.

Dave



Made changes. Sendemail page will not display.

The page cannot be displayed
There is a problem with the page you are trying to reach and it cannot
be
displayed.

--------------------------------------------------------------------------------

Please try the following:

Open the www.finishlineservices.biz home page, and then look for links
to
the information you want.
Click the Refresh button, or try again later.

Click Search to look for information on the Internet.
You can also see a list of related sites.




HTTP 500 - Internal server error
Internet Explorer



:

The page MUST be a .asp page for this to work and you can NOT use the
FrontPage Forms handler to do this (it doesn't work with .asp pages).
You'll have to use all ASP code to send the email.

What page (exactly) is the one with the issue and what's the page that
passes the information? I looked at the site and it appears that you
want
useddetails.asp to pass a STOCKID to new_page_2.htm when someone
clicks
"Get
Info". Is that correct? I don't see any hidden fields on
new_page_2.htm

If so, here's what you need to do:

On useddetails.asp change the Get Info link to point to the .asp page
with
the form

<a href="new_page_2.asp?STOCKID= .. <leave your code to retrieve the
number>
... ">Get Info</a>

Then rename new_page_2.htm to new_page_2.asp

On new_page_2.asp remove ALL the FrontPage web bot code (FrontPage
Forms
handler) and change the form tag to read:

<FORM METHOD="POST" ACTION="sendemail.asp">

Add back in the hidden field

<input type="hidden" name="ID"
value="<%=Request.QueryString("STOCKID")%>">

Now create a NEW page called sendemail.asp. Switch to Code View and
Delete
EVERYTHING there (all HTML code) and paste in this code:

<%
Dim iMsg
Dim iConf
Dim Flds
Dim strText

' set the CDOSYS configuration fields to use port 25 on the SMTP
server
Const cdoSendUsingPort = 2

set iMsg = CreateObject("CDO.Message")
set iConf = CreateObject("CDO.Configuration")

Set Flds = iConf.Fields

With Flds
..Item("http://schemas.microsoft.com/cdo/configuration/sendusing") =
cdoSendUsingPort
..Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") =
"mail.finishlineservices.biz"
..Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout")
= 10
..Update
End With

strText = "Name: " & trim(Request.Form("Contact_FullName")) & vbCrLf
strText = strText & "Title: " & trim(Request.Form("Contact_Title")) &
vbCrLf
strText = strText & "Organization: " &
trim(Request.Form("Contact_Organization")) & vbCrLf
strText = strText & "Work Phone: " &
trim(Request.Form("Contact_WorkPhone"))
& vbCrLf
strText = strText & "Fax: " & trim(Request.Form("Contact_FAX")) &
vbCrLf
strText = strText & "Email: " & trim(Request.Form("Contact_Email")) &
vbCrLf
strText = strText & "URL: " & trim(Request.Form("Contact_URL")) &
vbCrLf
&
vbCrLf
strText = strText & "Please send more information about stock number"
&
trim(Request.Form("ID")) & vbCrLf


With iMsg
Set .Configuration = iConf
..To = "(e-mail address removed)"
..From = trim(Request.Form("Contact_Email"))
..Subject = "Information Request"
..TextBody = strText
..Send
End With

Set iMsg = Nothing
Set iConf = Nothing
Set Flds = Nothing

Response.Redirect ("useddetails.asp?STOCKID=" &
trim(Request.Form("ID")) )
%>

You can edit the context of the email as you'd like. NOTE: You'll
need
to
find out the correct name of your mail server from your web host. In
the
code above I put mail.finishlineservices.biz but if that's not correct
you'll need to change it.

Finally, the last line above (response.redirect) is where they get
sent
after the email is sent. In this example I pass them back to the
useddetails page. You can change this to wherever you want them to
go.

When you're done you should have 3 pages:

useddetails.asp
new_page_2.asp
sendemail.asp


HTH






Made changes. Published. The info request page clears out what was
entered
(by end user) and does not send to email. site is
www.finishlineservices.biz. Renamed page to htm from asp it send to
email
but
will not carry the hidden field.
:

Thanks


--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
To find the best Newsgroup for FrontPage support see:

http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
_____________________________________________


| Stefan, Couple syntax corrections. The hidden field and is
missing
<%
%>.
| and the hyperlink needs some quotes. It should read:
|
| <a href="theformpage.asp?ID=<%=FP_Field(rs, fldname)%>">Get
Info</a>
|
| <input type="hidden" name="ID"
value="<%=Request.QueryString("ID")%>">
|
|
|
| | > Insert a column in the DBR table
| > In that column insert a link to another ASP page
| > (which will contain a form with the info request)
| > and
| > In the hyperlink add a parameter to identify the record
involved
to
you
| > when you get the email
| > (using some unique field (fldname below) from the DBR which
identifies
| > that record)
| >
| > So in the cell the link would look like
| > <a href="theformpage.asp?ID=<%=FP_Field(rs, fldname)%>>Get
Info</a>
| >
| > On the receiving end, in the form add a hidden form field with
that
ID
| > <input type="hidden" name="ID"
value="Request.QueryString("ID")>
| >
| > --
| >
| > _____________________________________________
| > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| > "Warning - Using the F1 Key will not break anything!" (-;
| > To find the best Newsgroup for FrontPage support see:
| >
http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
| > _____________________________________________
| >
| >
| > | > | Sure could usse a bit of help on this one
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top