"ConnieM" <cmcvicker@nfda-fastener.org> wrote in message
news:1105733661.719269.298090@z14g2000cwz.googlegr oups.com...[color=blue]
> Thanks for the response Martin. I tried replacing the Request.Form
> with
> Request.QueryString, but it still gives me undefined values in the
> email. Any other suggestions?[/color]
As Martin has already suggested, you mention that you "redirect to
another page" after processing the form. This will result in "throwing
away" all the values of the Request.QueryString() and Request.Form()
collections.
A redirect simply tells the browser to do a GET on the new URL, anything
in the POST buffer (or originally passed to <FORM
ACTION="yourFormHandler.asp?Something=Whatever">) is lost when the
browser requests the new page.
If you actually want to pass data from the page that handles <FORM
ACTION="..."> to a new page, you have two options:
1) store the values of the form in the Session object and retrieve them
on the new page (I don't recommend this)
2) take the values obtained from Request.Form(), write script to build a
query string containing the information you want and pass it to the
redirect page as part of the redirect.
So, on the page that handles <FORM ACTION="...">
<%
var CompanyNameVar = Request.Form('CompanyName');
var BlahBlahVar = Request.Form('BlahBlah');
var SomethingElseVar = Request.Form('SomethingElse');
// update the database and do whatever
Response.Redirect(
"SendEmail.asp?" +
"CompanyName=" +
Server.URLencode(CompanyNameVar) +
"&BlahBlah=" +
Server.URLencode(BlahBlahVar));
%>
NOW the values of CompanyName, BlahBlah (but NOT SomethingElse) will be
accessible to SendEmail.asp using Request.QueryString(). If you want
SomethingElse too, _you_ have to include it on the query string passed
to SendEmail.asp.
Of course, if you try to pass large (> 512 bytes) of information this
way, you run the risk that the browser won't pass the entire query
string correctly, resulting in lost data.
--
Grant Wagner <gwagner@agricoreunited.com>
comp.lang.javascript FAQ -
http://jibbering.com/faq