Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP General (http://www.velocityreviews.com/forums/f65-asp-general.html)
-   -   Requested Variable is Empty (http://www.velocityreviews.com/forums/t798071-requested-variable-is-empty.html)

Erica 02-28-2005 02:31 PM

Requested Variable is Empty
 
I am trying to display an error if the txtmsg variable is true and the
cellnumber and cellprovider variables are empty. Here is the code that
generates my error:

If request("txtmsg") = "true" then
If request("cellprovider") = "0" or trim(request("cellnumber")) = "" then
response.write("If user wants to be text messaged you must enter a cell
provider and cell number for the user. Click the back button to re-enter.")
end if
end if

--The problem is that the txtmsg variable has no value when I do a
response.write for debugging. Here is the code from the form that passes the
variable:


<input name="txtmsg" type="checkbox" id="txtmsg" value="<%if
request("txtmsg") = "true" then response.write("true") else
response.write("false")%>" <%if Lcase(request.querystring("txtmsg")) = "true"
then response.write("checked")%>>
Yes, I want to recieve a text message on my cell phone when I
recieve a fax.<br>


Erica 02-28-2005 02:33 PM

RE: Requested Variable is Empty
 
I'm sorry, here is the code from that form that posts the txtmsg variable
(see below):

<input name="txtmsg" type="checkbox" id="txtmsg" value="true" <%if
Lcase(request.querystring("txtmsg")) = "true" then
response.write("checked")%>>

"Erica" wrote:

> I am trying to display an error if the txtmsg variable is true and the
> cellnumber and cellprovider variables are empty. Here is the code that
> generates my error:
>
> If request("txtmsg") = "true" then
> If request("cellprovider") = "0" or trim(request("cellnumber")) = "" then
> response.write("If user wants to be text messaged you must enter a cell
> provider and cell number for the user. Click the back button to re-enter.")
> end if
> end if
>
> --The problem is that the txtmsg variable has no value when I do a
> response.write for debugging. Here is the code from the form that passes the
> variable:
>
>
> <input name="txtmsg" type="checkbox" id="txtmsg" value="<%if
> request("txtmsg") = "true" then response.write("true") else
> response.write("false")%>" <%if Lcase(request.querystring("txtmsg")) = "true"
> then response.write("checked")%>>
> Yes, I want to recieve a text message on my cell phone when I
> recieve a fax.<br>
>


Evertjan. 02-28-2005 03:03 PM

RE: Requested Variable is Empty
 
=?Utf-8?B?RXJpY2E=?= wrote on 28 feb 2005 in
microsoft.public.inetserver.asp.general:

> I'm sorry, here is the code from that form that posts the txtmsg
> variable (see below):
>
> <input name="txtmsg" type="checkbox" id="txtmsg" value="true" <%if
> Lcase(request.querystring("txtmsg")) = "true" then
> response.write("checked")%>>
>


[please do not toppost on usenet]

The lcase is not necessary, since it is lowercase anyway.

try this, works fine overhere:

<%
if request.querystring("txtmsg") = "on" then
ch = "checked"
else
ch = ""
end if
%>

<form method="get">
<input name="txtmsg"
type="checkbox"
<%=ch%> >
<input type=submit>
</form>


--
Evertjan.
The Netherlands.
(Replace all crosses with dots in my emailaddress)


Mark Schupp 02-28-2005 05:16 PM

Re: Requested Variable is Empty
 
Try doing a "view source" on the html that the page generates.

--
Mark Schupp
Head of Development
Integrity eLearning
www.ielearning.com


"Erica" <Erica@discussions.microsoft.com> wrote in message
news:DB252EDB-0C24-4B31-90B4-A489C65397A9@microsoft.com...
> I am trying to display an error if the txtmsg variable is true and the
> cellnumber and cellprovider variables are empty. Here is the code that
> generates my error:
>
> If request("txtmsg") = "true" then
> If request("cellprovider") = "0" or trim(request("cellnumber")) = "" then
> response.write("If user wants to be text messaged you must enter a cell
> provider and cell number for the user. Click the back button to

re-enter.")
> end if
> end if
>
> --The problem is that the txtmsg variable has no value when I do a
> response.write for debugging. Here is the code from the form that passes

the
> variable:
>
>
> <input name="txtmsg" type="checkbox" id="txtmsg" value="<%if
> request("txtmsg") = "true" then response.write("true") else
> response.write("false")%>" <%if Lcase(request.querystring("txtmsg")) =

"true"
> then response.write("checked")%>>
> Yes, I want to recieve a text message on my cell phone

when I
> recieve a fax.<br>
>





All times are GMT. The time now is 04:12 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.