Home All Groups Group Topic Archive Search About

displaying a drop down selection with ASP

Author
11 Oct 2006 4:59 PM
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.

Author
11 Oct 2006 5:04 PM
McKirahan
<bv***@hotmail.com> wrote in message
Show quoteHide quote
news:1160585954.924906.10490@c28g2000cwb.googlegroups.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="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.
Are all your drivers up to date? click for free checkup

Author
11 Oct 2006 5:11 PM
McKirahan
"McKirahan" <N***@McKirahan.com> wrote in message
news:vqOdnYdzO_ORubDYnZ2dnUVZ_rydnZ2d@comcast.com...
> <bv***@hotmail.com> wrote in message
> news:1160585954.924906.10490@c28g2000cwb.googlegroups.com...

[snip]

Show quoteHide quote
> > 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
Author
11 Oct 2006 7:52 PM
Dave Anderson
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#SummaryofReservedWords

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.
Author
11 Oct 2006 9:05 PM
McKirahan
Show quote Hide quote
"Dave Anderson" <NYRUMTPELVWH@spammotel.com> wrote in message
news:#rVDY7W7GHA.1560@TK2MSFTNGP04.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#SummaryofReservedWords
>
> 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.
Author
11 Oct 2006 9:12 PM
Dave Anderson
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.
Author
12 Oct 2006 3:20 PM
bvlmv
that was it...thanks!
Dave Anderson wrote:
Show quoteHide quote
> 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.

Bookmark and Share