473,573 Members | 3,250 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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("cellpr ovider") = "0" or trim(request("c ellnumber")) = "" 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.q uerystring("txt msg")) = "true"
then response.write( "checked")% >>
Yes, I want to recieve a text message on my cell phone when I
recieve a fax.<br>

Jul 22 '05 #1
3 1382
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.q uerystring("txt msg")) = "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("cellpr ovider") = "0" or trim(request("c ellnumber")) = "" 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.q uerystring("txt msg")) = "true"
then response.write( "checked")% >>
Yes, I want to recieve a text message on my cell phone when I
recieve a fax.<br>

Jul 22 '05 #2
=?Utf-8?B?RXJpY2E=?= wrote on 28 feb 2005 in
microsoft.publi c.inetserver.as p.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.q uerystring("txt msg")) = "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.queryst ring("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)

Jul 22 '05 #3
Try doing a "view source" on the html that the page generates.

--
Mark Schupp
Head of Development
Integrity eLearning
www.ielearning.com
"Erica" <Er***@discussi ons.microsoft.c om> wrote in message
news:DB******** *************** ***********@mic rosoft.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("cellpr ovider") = "0" or trim(request("c ellnumber")) = "" 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.q uerystring("txt msg")) = "true" then response.write( "checked")% >>
Yes, I want to recieve a text message on my cell phone when I recieve a fax.<br>

Jul 22 '05 #4

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

Similar topics

1
1620
by: adrianTNT | last post by:
Hello, can anyone help me with this? I am new to PHP. I would like to load a variable from a php file, the php script should only give the variable if it was requested by a page on my site. the php script would have to be something like: <? /* some test here, if this script was accesed from http://www.adriantnt.com then...
4
1321
by: David Logan | last post by:
Howdy I am displaying an image on an ASP page using an <IMG Src=Image.asp>. Image.asp delivers the image using BinaryWrite. This is done to keep the images from being harvestable. My problem is I don't want somebody to be able to come directly to Image.asp so I wanted Image.asp to be able to get the Image to display from the originating...
6
2492
by: Serge Myrand | last post by:
Hi everybody, It seems that a variable cannot be assign to HTMLBody field. Am'I doing something wrong? - this line write a bold html phrase in the email body ..HTMLBody = "<HTML><HEAD><BODY><B>Here is the text body</BODY></HTML>" - this line produce an empty body. The variable TableData contains all the required HTML to construct the...
7
1802
by: Andy Fish | last post by:
consider the following fragment of xsl: <xsl:variable name="v1"><xsl:if test="false()"/></xsl:variable> <xsl:variable name="v2"></xsl:variable> <xsl:value-of select="boolean($v1)"/> <xsl:value-of select="boolean($v2)"/> it returns true for v1 but false for v2. (I'm using microsoft .net 1.1) how so? presumably v1 is a non-empty node set...
37
2555
by: Joergen Bech | last post by:
(Slightly religious question): Suppose I have the following class: ---snip--- Public Class MyClass Private _MyVariable As Integer Public Property MyVariable() As Integer Get
5
2013
by: srikanth | last post by:
is it possible not to decrement the top variable after we remove(or retreive) a file from a stack >MY IDEA is:> if top is not decremented the stack is like it has some files existing in it with the top most file empty >i.e, something like hiding the files by one step (or one position of stack) >i.e,if someone tries to extract the top most...
2
2630
by: adam | last post by:
Hi ASP Expert, I encounter a page reload situation in ASP. It is I need a way to differentiate whether the current page - "Application_Result.asp" got reloaded itself when user click on the browser Refresh button or is requested by the previous page "Application_Form.asp". I tried using <%if Request.ServerVariables("REQUEST_METHOD") =...
20
12710
by: teddysnips | last post by:
Weird. I have taken over responsibility for a legacy application, Access 2k3, split FE/BE. The client has reported a problem and I'm investigating. I didn't write the application. The AutoExec macro calls a function "InitApplication" which, in turn, calls a function to set the value of a global string variable
1
3877
by: faultykid | last post by:
I would like to store a variable then call it back later. I have a variable on line 198 www = ''+this._ad.clickUrl+''; and on line 321 i try document.write(www);
0
7779
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
8202
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7781
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
8064
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5590
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5291
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
1
2208
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1301
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1040
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.