473,398 Members | 2,335 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

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,value 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 1204
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,value 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,value 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("amount")

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("amount")

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("amount")

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.WriteLine 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("amount")

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.WriteLine 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.write 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("amount")

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.WriteLine 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.write 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("amount")
>>
>> 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.WriteLine 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.write 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...else 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("amount")
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
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...
9
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...
7
by: Scott M. | last post by:
How can I disable the cross-site scripting check for one particular page of a site?
6
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...
17
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...
3
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...
6
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...
5
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...
8
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,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
0
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...
0
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...
0
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...
0
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,...
0
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...

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.