473,761 Members | 6,993 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

displaying a drop down selection with ASP

Hello,
relatively new to programming and just trying to create a simple asp
page.
I have the following drop down menu on a html page and when submitting
i would like to call out on asp what someone has selected.

<select size="1" name="type">
<option value="Prospect ">Prospect</option>
<option value="Suspect" >Suspect</option>
<option value="Qualifie d">Qualified </option>
<option value="Proposed ">Proposed</option>
<option value="Closed"> Closed</option>
<option value="Lost">Lo st</option>
</select></b></p>

I also have regular fields on the html page which works great when
submitting but for some reason i can't get the dropdown selection to
display

fname = request.form("f name")
lname = request.form("l name")
email = request.form("e mail")
type = request.form("t ype") <----- this is what i have to call a drop
down selection.

I get the following error

Microsoft VBScript compilation error '800a0400'

Expected statement

/chip/AddNew.asp, line 13

type = request.form("t ype")
^

Any help would be greatly appreciate.

Oct 11 '06 #1
6 1948
<bv***@hotmail. comwrote in message
news:11******** *************@c 28g2000cwb.goog legroups.com...
Hello,
relatively new to programming and just trying to create a simple asp
page.
I have the following drop down menu on a html page and when submitting
i would like to call out on asp what someone has selected.

<select size="1" name="type">
<option value="Prospect ">Prospect</option>
<option value="Suspect" >Suspect</option>
<option value="Qualifie d">Qualified </option>
<option value="Proposed ">Proposed</option>
<option value="Closed"> Closed</option>
<option value="Lost">Lo st</option>
</select></b></p>

I also have regular fields on the html page which works great when
submitting but for some reason i can't get the dropdown selection to
display

fname = request.form("f name")
lname = request.form("l name")
email = request.form("e mail")
type = request.form("t ype") <----- this is what i have to call a drop
down selection.

I get the following error

Microsoft VBScript compilation error '800a0400'

Expected statement

/chip/AddNew.asp, line 13

type = request.form("t ype")
^
"type" is a reserved word -- don't use it.
Oct 11 '06 #2
"McKirahan" <Ne**@McKirahan .comwrote in message
news:vq******** *************** *******@comcast .com...
<bv***@hotmail. comwrote in message
news:11******** *************@c 28g2000cwb.goog legroups.com...
[snip]
type = request.form("t ype") <----- this is what i have to call a drop
down selection.

I get the following error

Microsoft VBScript compilation error '800a0400'

Expected statement

/chip/AddNew.asp, line 13

type = request.form("t ype")
^

"type" is a reserved word -- don't use it.
And yet this says it isn't:

VBScript Language Reference
URL:http://docs.rinet.ru/ZhPP/ch34.htm#S...fReservedWords

I'd try a different field name though.

This supports your approach:

Examples: ASP Request Object Form Collection
URL:http://www.netzone.ch/caspdoc/Ch9_ASPBuiltIn40.html

Oct 11 '06 #3
McKirahan wrote:
>"type" is a reserved word -- don't use it.

And yet this says it isn't:

VBScript Language Reference
URL:http://docs.rinet.ru/ZhPP/ch34.htm#S...fReservedWords
And yet this says it is:
http://support.microsoft.com/default.aspx/kb/216528

Who do you believe, Microsoft, or rinet.ru?

--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms.
Oct 11 '06 #4
"Dave Anderson" <NY**********@s pammotel.comwro te in message
news:#r******** ******@TK2MSFTN GP04.phx.gbl...
McKirahan wrote:
"type" is a reserved word -- don't use it.
And yet this says it isn't:

VBScript Language Reference
URL:http://docs.rinet.ru/ZhPP/ch34.htm#S...fReservedWords

And yet this says it is:
http://support.microsoft.com/default.aspx/kb/216528

Who do you believe, Microsoft, or rinet.ru?
I agree that "type" is a reserved word.
I just didn't find a supporting link immediately.
Oct 11 '06 #5
McKirahan wrote:
I agree that "type" is a reserved word.
I just didn't find a supporting link immediately.
Yeah - I noticed right after I posted that you were responding to yourself.

--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms.
Oct 11 '06 #6
that was it...thanks!
Dave Anderson wrote:
McKirahan wrote:
I agree that "type" is a reserved word.
I just didn't find a supporting link immediately.

Yeah - I noticed right after I posted that you were responding to yourself.

--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms.
Oct 12 '06 #7

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

Similar topics

1
2913
by: Dan | last post by:
This is one that has me stumped and I need an expert's input. Any ideas why the values from the second script-generated drop down list isn't recognized by the script to add time values to the text boxes? What this script is suppose to do is change the value of a second drop down list based on the selection from the first. Then a value is chosen from the script generated drop down list in the
5
6526
by: SirPoonga | last post by:
I think I'd have to do a combination of ASP and javascript to do this. What I want to do fill the first drop down box with values from a database query. Then based off that selection fill in the values of another drop down. Let's use the car industry as an example. Lets say I am storing in a database the data and relationships between car make, car type, and car model. So the first drop down box would like all makes. Upon selecting...
2
9472
by: kmnotes04 | last post by:
Is it possible to link one drop-down box to another? For example, if a name is chosen from a drop-down list, can another drop-down list then automatically display the person's office as a result of the choice made in the first drop-down list? If so, how can that be done? I am working with 'Teach Yourself Microsoft Access' and I didn't see it discussed in that book (if it's even possible to do). Or would I just have to create linked tables...
3
2996
by: John Walker | last post by:
Hi, On an ASP.NET page I have a drop down list control. When the user pulls down the list and makes a selection, I perform validation, and if the validation fails I want the selected item in the drop down box to go back to what the value was before the user tried to change it, but at that point I will not know what the original value was. Or is there a drop down control "revert" method, or is there any way of knowing what the original...
4
1422
by: KitKat | last post by:
Problem trying to figure this out, using a combo box selection I need to go to each folder, Cam 1, Cam 2, Cam 4, Cam 6, Cam 7,and Cam 8 and display each picture (from selection) from each folder and display in pictureboxes pcbCam1, pcbCam2, pcbCam4, pcbCam6, pcbCam7, and pcbCam8. So far the code works for one picture box not the others. Also when I reenter a different date the counter (+1) messes up....HELP
3
1472
by: CSharpguy | last post by:
I have 3 drop downs that are populated from the databasem 4 of my web pages need to have this drop down, how can I trap the selection made in the drop down and popuate my grid on my form?
2
3066
by: ponyeyes | last post by:
Hi There, I am a bit of a newbie to PHP programming and I would like to know how I can place a selected drop down option into a PHP variable and then produce an sql query which incorporates this variable. I have created a dynamic drop down menu that populates itself with data from a MySQL table. I now want it to populate a second drop-down menu with relevant options from my database, based upon a query using a variable. For example........
3
2552
by: amcoldspy | last post by:
Hi, am trying to create dynamic drop down boxes.. there are 3 drop down boxes. The second drop down box elements are to be update based on the selection made in the first drop down box (selecting an element on the first drop down box calls a getData.jsp file which returns the result.) the third drop down box elements are to be update based on the selection made in the second drop down box (selecting an element on the second drop down...
4
8461
by: bonneylake | last post by:
Hey Everyone, Well this is probably a pretty easy question, but for some reason i just can not figure it out. What i am trying to do is redisplay what was entered previously. I have figured everything out except for this drop down box. Right now i am using one cfoutput query to display in the drop down box the values for it that are in the database. However, now i created a second query to display what was entered previously. The thing...
0
9554
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
9376
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
9988
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...
1
9923
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 most users, this new feature is actually very convenient. If you want to control the update process,...
0
8813
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...
1
7358
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5266
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...
0
5405
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
3509
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.