displaying a drop down selection with ASP

B

bvlmv

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="Qualified">Qualified</option>
<option value="Proposed">Proposed</option>
<option value="Closed">Closed</option>
<option value="Lost">Lost</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("fname")
lname = request.form("lname")
email = request.form("email")
type = request.form("type") <----- 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("type")
^

Any help would be greatly appreciate.
 
M

McKirahan

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="Qualified">Qualified</option>
<option value="Proposed">Proposed</option>
<option value="Closed">Closed</option>
<option value="Lost">Lost</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("fname")
lname = request.form("lname")
email = request.form("email")
type = request.form("type") <----- 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("type")
^

"type" is a reserved word -- don't use it.
 
M

McKirahan

McKirahan said:
[snip]
type = request.form("type") <----- 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("type")
^

"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#SummaryofReservedWords

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
 
D

Dave Anderson

McKirahan said:
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.
 
B

bvlmv

that was it...thanks!
Dave said:
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top