473,842 Members | 1,626 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Additional asp scripting help

Wow, this has been some trip. I'm learning some asp scripting to apply toward
some online forms and they are working really good.

However I do have this one problem that I can't seem to get to work right.
There are two radio buttons to choose from, one for individual,valu e is $25
and the other for couple, value is $35. I am passing the dollar amount to
several different webpages but having trouble bringing over the category
(individual or couple) as comments. This is what I have so far:

dim comments
if amount = $25 then
comments = individual
else
comments = couple
end if

The amount is dimmed as well. This of course is not working and any help
would be greatly appreciated.

Thanks,
NF
May 30 '06 #1
8 1219
freemann wrote:
Wow, this has been some trip. I'm learning some asp scripting to
apply toward some online forms and they are working really good.

However I do have this one problem that I can't seem to get to work
right. There are two radio buttons to choose from, one for
individual,valu e is $25 and the other for couple, value is $35. I am
passing the dollar amount to several different webpages but having
trouble bringing over the category (individual or couple) as
comments. This is what I have so far:

dim comments
if amount = $25 then
comments = individual
else
comments = couple
end if

The amount is dimmed as well. This of course is not working and any
help would be greatly appreciated.

You did not show how you set amount to a value. It's relevant. Show us.

Before you do, execute
response.write amount

to see if the result makes the problem clear to you. If not, show us the
result of thhe response.write statement as well.

Bob Barrows

--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
May 30 '06 #2


"Bob Barrows [MVP]" wrote:
freemann wrote:
Wow, this has been some trip. I'm learning some asp scripting to
apply toward some online forms and they are working really good.

However I do have this one problem that I can't seem to get to work
right. There are two radio buttons to choose from, one for
individual,valu e is $25 and the other for couple, value is $35. I am
passing the dollar amount to several different webpages but having
trouble bringing over the category (individual or couple) as
comments. This is what I have so far:

dim comments
if amount = $25 then
comments = individual
else
comments = couple
end if

The amount is dimmed as well. This of course is not working and any
help would be greatly appreciated.

You did not show how you set amount to a value. It's relevant. Show us.

Before you do, execute
response.write amount

to see if the result makes the problem clear to you. If not, show us the
result of thhe response.write statement as well.

Bob Barrows

--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.

dim amount
amount = Request.Form("a mount")

It all works fine without the if statement but I would really like to have
the comment category (individual or couple) to go along with the amount.

Thanks.
May 30 '06 #3
freemann wrote:

dim amount
amount = Request.Form("a mount")

It all works fine without the if statement but I would really like to
have the comment category (individual or couple) to go along with the
amount.

Thanks.


So where is the result of

response.write amount

??

--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
May 30 '06 #4


"Bob Barrows [MVP]" wrote:
freemann wrote:

dim amount
amount = Request.Form("a mount")

It all works fine without the if statement but I would really like to
have the comment category (individual or couple) to go along with the
amount.

Thanks.


So where is the result of

response.write amount

??

--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.


This is sending to a text file:
objTextStream.W riteLine amount

And this is sending to another webpage for processing:
<% InsertSignature (amount)%>
May 30 '06 #5
freemann wrote:
"Bob Barrows [MVP]" wrote:
freemann wrote:


dim amount
amount = Request.Form("a mount")

It all works fine without the if statement but I would really like
to have the comment category (individual or couple) to go along
with the amount.

Thanks.


So where is the result of

response.write amount

??


This is sending to a text file:
objTextStream.W riteLine amount

And this is sending to another webpage for processing:
<% InsertSignature (amount)%>


I don't understand. What does this have to do with my request for you to
put a "response.w rite amount" statement into your page and run the page
to see what the amount variable contains? This is basic debugging, and
is necessary in this case if we are to have any chance of answering your
question.

--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.

May 30 '06 #6


"Bob Barrows [MVP]" wrote:
freemann wrote:
"Bob Barrows [MVP]" wrote:
freemann wrote:
>
>
dim amount
amount = Request.Form("a mount")

It all works fine without the if statement but I would really like
to have the comment category (individual or couple) to go along
with the amount.

Thanks.

So where is the result of

response.write amount

??


This is sending to a text file:
objTextStream.W riteLine amount

And this is sending to another webpage for processing:
<% InsertSignature (amount)%>


I don't understand. What does this have to do with my request for you to
put a "response.w rite amount" statement into your page and run the page
to see what the amount variable contains? This is basic debugging, and
is necessary in this case if we are to have any chance of answering your
question.

--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.

If I understand what you are saying, the amount variable contains nothing. I
am getting the amount for an input form which is then passed to a couple
other forms.

My main concern is how to apply an if then else statement in asp scripting.

Thanks,
May 30 '06 #7
freemann wrote:
If I understand what you are saying,

You don't. :-) the amount variable contains
nothing. I am getting the amount for an input form which is then
passed to a couple other forms.
Sigh. I need to know what amount contains _when the page is running!_

My main concern is how to apply an if then else statement in asp
scripting.

Which I cannot answer if I do not know the value contained in the amount
variable.

Look. Insert the response.write statement into the asp page. Save it.
Browse to the input form. Put some values in and submit it. Look at the
result of the response.write. Show me what it contains so I can help you
create the correct comparison in your if statement. I could make some
guesses, but I'd rather not waste my time and yours.

Bob Barrows
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
May 30 '06 #8

freemann wrote:
"Bob Barrows [MVP]" wrote:
freemann wrote:
"Bob Barrows [MVP]" wrote:

> freemann wrote:
>>>
>>>
>> dim amount
>> amount = Request.Form("a mount")
>>
>> It all works fine without the if statement but I would really like
>> to have the comment category (individual or couple) to go along
>> with the amount.
>>
>> Thanks.
>
> So where is the result of
>
> response.write amount
>
> ??
>
>

This is sending to a text file:
objTextStream.W riteLine amount

And this is sending to another webpage for processing:
<% InsertSignature (amount)%>


I don't understand. What does this have to do with my request for you to
put a "response.w rite amount" statement into your page and run the page
to see what the amount variable contains? This is basic debugging, and
is necessary in this case if we are to have any chance of answering your
question.

--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.

If I understand what you are saying, the amount variable contains nothing. I
am getting the amount for an input form which is then passed to a couple
other forms.

My main concern is how to apply an if then else statement in asp scripting.


Your example is syntactically correct, so you know how to apply an
if...then...els e statement. What your concern should be is to get it
to work correctly based on the values of the variables you are
comparing. You can't do that without checking the value of the
variables, and as Bob has pointed out in three posts up to now, the
only way to do that is to response.write the variables to the page at
appropriate intervals.

amount = Request.Form("a mount")
response.write "Amount is " & amount

Is your form's method post or get? Also show the html for the radio
buttons - not the entire form.

--
Mike Brind

May 30 '06 #9

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

Similar topics

1
2474
by: Joe Foran | last post by:
Hi everyone, I'm in a bit of a bind... I have some batch scripting ability but next to no skill in VBS. I had a set of scripts that would: Query the registry key HKLM\SOFTWARE\Microsoft\SMS\Client\Configuration\Client Application Launchers\Hardware Inventory Agent If the value returned is 0x79726f74 then it would stop the SMS Client
9
10002
by: What-a-Tool | last post by:
Dim MyMsg Set MyMsg = server.createObject("Scripting.Dictionary") MyMsg.Add "KeyVal1", "My Message1" MyMsg.Add "KeyVal2", "My Message2" MyMsg.Add "KeyVal3", "My Message3" for i = 1 To MyMsg.Count Response.Write(MyMsg.Item(i)) next
7
3916
by: Scott M. | last post by:
How can I disable the cross-site scripting check for one particular page of a site?
6
7209
by: RM | last post by:
This is from the new KOffice Announcement. http://www.koffice.org/announcements/announce-1.5.php '''This version of KOffice features a start of a unified scripting solution called Kross. Kross provides cross-language support for scripting (thus its name) and at present supports Python and Ruby. Kross is easy to include into programs previously lacking scripting abilities, and is included in this version as a technology preview. So
17
2089
by: freemann | last post by:
Can anyone provide example code showing how to send form results to a results page, email and a comma delimited file? Notice that I need it going to all three locations. Details: I have forms created and working. The first form the user fills out and submits. The form properties are set to Send to other: "Custom ISAPI, NSAPI, CGI, OR ASP SCRIPTING. The method is "POST" and the action is "secondpage.asp". I had to go this route because...
3
2308
by: B | last post by:
My code below works fine when run from my pc (changed all the values for obvious reasons). The code is placed inside a DTS task via VBS scripting. But when I try to run directly from the server where sqlserver is installed, the script fails. I have SMTP running, but there is no outlook installed. Can someone please advise what I am missing. Thanks Bob
6
17033
by: =?Utf-8?B?WW9naSBXYXRjaGVy?= | last post by:
Hello, I am using Visual Studio-2003. I created a project to build my library. Since I am using third party libraries as well, I have specified those additional library dependencies in project as "Additional Dependencies" under Linker-Input options. Since those libraries are also in different directory, I specified that library path in project as "Additional Library Directories" under Linker-General options. This is where I see some...
5
1960
WebMissy
by: WebMissy | last post by:
I have a forum all set up and everything works great. I decide to use IE 7 for the benefit of transparent PNG files. All is well with that but now my scripting for my colored scrollbars doesn't show the scrollbars. When I use IE6 the transparent PNG files don't show transparent but the scripting for the scrollbars work. Could someone please help me? I use the right CSS for the forum scrollbars example seen below: (this can't be altered by...
8
4185
by: Nagarajan | last post by:
Hi group, I need to develop a web application. I am in a fix as to choose among the various server-side scripting options. I want to explore python (am a newbie) to gain expertise and upon search, I learnt about PSP(Python Server Pages) that uses Jython as its scripting language. Is it a better option over PHP or Perl? Could anyone point out the pros and cons of using PSP over others? Help much appreciated.
0
9876
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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9717
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10617
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10318
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9459
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5699
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4506
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
2
4096
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3148
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.