|
 |
access_asp thread: drop down list with asp
Message #1 by "sharon buggle" <s.buggle@w...> on Thu, 4 Oct 2001 17:33:39
|
|
I am sort of new to asp and hope someone will answer this really easy ?
I have code below:
response.write"<SELECT name='Selpage'>"
response.write" <option value='Voy'>Voyage</OPTION>"
response.write"<OPTION value ='PtDis'>Ports of Discharge</OPTION>"
response.write"<OPTION value ='A&EPtDis' >Add/Edit Port of
Discharge</OPTION>"
response.write"<OPTION value='A&EBOL'>Add/Edit Bill of Lading</OPTION>"
response.write"<OPTION value='BOLCon'>Bill of Lading Containers</OPTION>"
response.write"<OPTION value='ConDet'>Container Details</OPTION>"
response.write"<OPTION value='ConChg'>Container Charges</OPTION>"
response.write"<OPTION value='ConRem'>Container Remarks</OPTION>"
response.write "</SELECT>"
I am trying to let the user pick from list above and then they hit a
button but it does not keep the value they pick.
I have tried option selected= "& Request("Selpage")&" but it does not work.
also tried
if len(request("Selpage") > 0
or
if request("Selpage") = "PtDis then ....
i thank you for your time!
SB
Message #2 by Roger Balliger <Roger@i...> on Thu, 4 Oct 2001 10:04:35 -0700
|
|
When the user clicks the button - what happens? Where is the form data
being sent? To the same page or a different ASP page? It is on this other
ASP page that the Request.form("Selpage") should collect which ever option
was selected. Using ASP, you cannot dynamically store the response before
the page/form data is sent to the server. If this is your intention only
JavaScript will suffice.
Roger
-----Original Message-----
From: sharon buggle [mailto:s.buggle@w...]
Sent: Thursday, October 04, 2001 10:34 AM
To: Access ASP
Subject: [access_asp] drop down list with asp
I am sort of new to asp and hope someone will answer this really easy ?
I have code below:
response.write"<SELECT name='Selpage'>"
response.write" <option value='Voy'>Voyage</OPTION>"
response.write"<OPTION value ='PtDis'>Ports of Discharge</OPTION>"
response.write"<OPTION value ='A&EPtDis' >Add/Edit Port of
Discharge</OPTION>"
response.write"<OPTION value='A&EBOL'>Add/Edit Bill of Lading</OPTION>"
response.write"<OPTION value='BOLCon'>Bill of Lading Containers</OPTION>"
response.write"<OPTION value='ConDet'>Container Details</OPTION>"
response.write"<OPTION value='ConChg'>Container Charges</OPTION>"
response.write"<OPTION value='ConRem'>Container Remarks</OPTION>"
response.write "</SELECT>"
I am trying to let the user pick from list above and then they hit a
button but it does not keep the value they pick.
I have tried option selected= "& Request("Selpage")&" but it does not work.
also tried
if len(request("Selpage") > 0
or
if request("Selpage") = "PtDis then ....
i thank you for your time!
SB
Message #3 by "sharon buggle" <s.buggle@w...> on Thu, 4 Oct 2001 20:55:58
|
|
> When the user clicks the button - what happens? Where is the form data
> being sent? To the same page or a different ASP page? It is on this
other
> ASP page that the Request.form("Selpage") should collect which ever
option
> was selected. Using ASP, you cannot dynamically store the response
before
> the page/form data is sent to the server. If this is your intention only
> JavaScript will suffice.
>
> Roger
>
> -----Original Message-----
> From: sharon buggle [mailto:s.buggle@w...]
> Sent: Thursday, October 04, 2001 10:34 AM
> To: Access ASP
> Subject: [access_asp] drop down list with asp
>
>
> I am sort of new to asp and hope someone will answer this really easy ?
>
> I have code below:
>
> response.write"<SELECT name='Selpage'>"
> response.write" <option value='Voy'>Voyage</OPTION>"
> response.write"<OPTION value ='PtDis'>Ports of Discharge</OPTION>"
> response.write"<OPTION value ='A&EPtDis' >Add/Edit Port of
> Discharge</OPTION>"
> response.write"<OPTION value='A&EBOL'>Add/Edit Bill of Lading</OPTION>"
> response.write"<OPTION value='BOLCon'>Bill of Lading
Containers</OPTION>"
> response.write"<OPTION value='ConDet'>Container Details</OPTION>"
> response.write"<OPTION value='ConChg'>Container Charges</OPTION>"
> response.write"<OPTION value='ConRem'>Container Remarks</OPTION>"
> response.write "</SELECT>"
>
>
> I am trying to let the user pick from list above and then they hit a
> button but it does not keep the value they pick.
>
> I have tried option selected= "& Request("Selpage")&" but it does not
work.
>
> also tried
>
> if len(request("Selpage") > 0
>
> or
>
> if request("Selpage") = "PtDis then ....
>
> i thank you for your time!
>
> SB
the form action is to itself.
when they click an item in list and hit button depending on what item was
chosen i do a response.redirect " whatever.asp" right now i am just seeing
if the item chosen is being given to (selpage) name and show a message if
it is but it is not doing message
do i do a select case after they pick an item or do i do the request()
= "whatever"
thanks,
Message #4 by "Petr Nejedly" <asp@n...> on Thu, 4 Oct 2001 22:39:05 +0100
|
|
This should work:
<%
if request.querystring("action") <> "post" then
response.write "<form method='post' action='thisfilename.asp?action=post'>"
response.write "<SELECT name='Selpage'>"
response.write "<option value='Voy'>Voyage</OPTION>"
response.write "<OPTION value='PtDis'>Ports of Discharge</OPTION>"
response.write "<OPTION value='A&EPtDis'>Add/Edit Port of
Discharge</OPTION>"
response.write "<OPTION value='A&EBOL'>Add/Edit Bill of Lading</OPTION>"
response.write "<OPTION value='BOLCon'>Bill of Lading Containers</OPTION>"
response.write "<OPTION value='ConDet'>Container Details</OPTION>"
response.write "<OPTION value='ConChg'>Container Charges</OPTION>"
response.write "<OPTION value='ConRem'>Container Remarks</OPTION>"
response.write "</SELECT>"
response.write "<input type='submit' value=' OK '>"
response.write "</form>"
else
response.write request.form("Selpage")
end if
%>
----- Original Message -----
From: sharon buggle <s.buggle@w...>
To: Access ASP <access_asp@p...>
Sent: Thursday, October 04, 2001 5:33 PM
Subject: [access_asp] drop down list with asp
> I am sort of new to asp and hope someone will answer this really easy ?
>
> I have code below:
>
> response.write"<SELECT name='Selpage'>"
> response.write" <option value='Voy'>Voyage</OPTION>"
> response.write"<OPTION value ='PtDis'>Ports of Discharge</OPTION>"
> response.write"<OPTION value ='A&EPtDis' >Add/Edit Port of
> Discharge</OPTION>"
> response.write"<OPTION value='A&EBOL'>Add/Edit Bill of Lading</OPTION>"
> response.write"<OPTION value='BOLCon'>Bill of Lading
Containers</OPTION>"
> response.write"<OPTION value='ConDet'>Container Details</OPTION>"
> response.write"<OPTION value='ConChg'>Container Charges</OPTION>"
> response.write"<OPTION value='ConRem'>Container Remarks</OPTION>"
> response.write "</SELECT>"
>
>
> I am trying to let the user pick from list above and then they hit a
> button but it does not keep the value they pick.
>
> I have tried option selected= "& Request("Selpage")&" but it does not
work.
>
> also tried
>
> if len(request("Selpage") > 0
>
> or
>
> if request("Selpage") = "PtDis then ....
>
> i thank you for your time!
>
> SB
>
Message #5 by Roger Balliger <Roger@i...> on Thu, 4 Oct 2001 13:57:47 -0700
|
|
You should be able to submit the form to itself (the same ASP page) and
collect the form data by using the request.form (). the first time the page
loads the value will be blank - after the submit button is pressed and the
form data is passed, the value will be what ever the user selected. If it
doesn't work there might be something else wrong with your ASP page.
Roger
-----Original Message-----
From: sharon buggle [mailto:s.buggle@w...]
Sent: Thursday, October 04, 2001 1:56 PM
To: Access ASP
Subject: [access_asp] RE: drop down list with asp
> When the user clicks the button - what happens? Where is the form data
> being sent? To the same page or a different ASP page? It is on this
other
> ASP page that the Request.form("Selpage") should collect which ever
option
> was selected. Using ASP, you cannot dynamically store the response
before
> the page/form data is sent to the server. If this is your intention only
> JavaScript will suffice.
>
> Roger
>
> -----Original Message-----
> From: sharon buggle [mailto:s.buggle@w...]
> Sent: Thursday, October 04, 2001 10:34 AM
> To: Access ASP
> Subject: [access_asp] drop down list with asp
>
>
> I am sort of new to asp and hope someone will answer this really easy ?
>
> I have code below:
>
> response.write"<SELECT name='Selpage'>"
> response.write" <option value='Voy'>Voyage</OPTION>"
> response.write"<OPTION value ='PtDis'>Ports of Discharge</OPTION>"
> response.write"<OPTION value ='A&EPtDis' >Add/Edit Port of
> Discharge</OPTION>"
> response.write"<OPTION value='A&EBOL'>Add/Edit Bill of Lading</OPTION>"
> response.write"<OPTION value='BOLCon'>Bill of Lading
Containers</OPTION>"
> response.write"<OPTION value='ConDet'>Container Details</OPTION>"
> response.write"<OPTION value='ConChg'>Container Charges</OPTION>"
> response.write"<OPTION value='ConRem'>Container Remarks</OPTION>"
> response.write "</SELECT>"
>
>
> I am trying to let the user pick from list above and then they hit a
> button but it does not keep the value they pick.
>
> I have tried option selected= "& Request("Selpage")&" but it does not
work.
>
> also tried
>
> if len(request("Selpage") > 0
>
> or
>
> if request("Selpage") = "PtDis then ....
>
> i thank you for your time!
>
> SB
the form action is to itself.
when they click an item in list and hit button depending on what item was
chosen i do a response.redirect " whatever.asp" right now i am just seeing
if the item chosen is being given to (selpage) name and show a message if
it is but it is not doing message
do i do a select case after they pick an item or do i do the request()
= "whatever"
thanks,
Message #6 by "Michael Kent Simmons" <msimmons@u...> on Thu, 4 Oct 2001 18:06:02 -0300
|
|
Sharon:
This works:
<%
Response.Write "<SELECT name='Selpage'>"
Response.Write " <option value='Voy'>Voyage"
Response.Write "<OPTION value ='PtDis'>Ports of Discharge"
Response.Write "<OPTION value ='AEPtDis' >Add/Edit Port of Discharge"
Response.Write "<OPTION value='AEBOL'>Add/Edit Bill of Lading"
Response.Write "<OPTION value='BOLCon'>Bill of Lading Containers"
Response.Write "<OPTION value='ConDet'>Container Details"
Response.Write "<OPTION value='ConChg'>Container Charges"
Response.Write "<OPTION value='ConRem'>Container Remarks"
Response.Write "</SELECT>"
%>
m.
____________________________________________________________
----- Original Message -----
From: "sharon buggle" <s.buggle@w...>
To: "Access ASP" <access_asp@p...>
Sent: Thursday, October 04, 2001 5:33 PM
Subject: [access_asp] drop down list with asp
> I am sort of new to asp and hope someone will answer this really easy ?
>
> I have code below:
>
> response.write"<SELECT name='Selpage'>"
> response.write" <option value='Voy'>Voyage</OPTION>"
> response.write"<OPTION value ='PtDis'>Ports of Discharge</OPTION>"
> response.write"<OPTION value ='A&EPtDis' >Add/Edit Port of
> Discharge</OPTION>"
> response.write"<OPTION value='A&EBOL'>Add/Edit Bill of Lading</OPTION>"
> response.write"<OPTION value='BOLCon'>Bill of Lading
Containers</OPTION>"
> response.write"<OPTION value='ConDet'>Container Details</OPTION>"
> response.write"<OPTION value='ConChg'>Container Charges</OPTION>"
> response.write"<OPTION value='ConRem'>Container Remarks</OPTION>"
> response.write "</SELECT>"
>
>
> I am trying to let the user pick from list above and then they hit a
> button but it does not keep the value they pick.
>
> I have tried option selected= "& Request("Selpage")&" but it does not
work.
>
> also tried
>
> if len(request("Selpage") > 0
>
> or
>
> if request("Selpage") = "PtDis then ....
>
> i thank you for your time!
>
> SB
Message #7 by "Frank Kech" <fkech@s...> on Fri, 5 Oct 2001 07:20:00 -0500
|
|
I recommend getting the following book: Active Server Pages 3.0 (there is
both beginner and professional versions). All of your confusion will be
cleared in less than 50 pages (about 2 hours of reading).
-----Original Message-----
From: sharon buggle [mailto:s.buggle@w...]
Sent: Thursday, October 04, 2001 8:56 PM
To: Access ASP
Subject: [access_asp] RE: drop down list with asp
> When the user clicks the button - what happens? Where is the form data
> being sent? To the same page or a different ASP page? It is on this
other
> ASP page that the Request.form("Selpage") should collect which ever
option
> was selected. Using ASP, you cannot dynamically store the response
before
> the page/form data is sent to the server. If this is your intention only
> JavaScript will suffice.
>
> Roger
>
> -----Original Message-----
> From: sharon buggle [mailto:s.buggle@w...]
> Sent: Thursday, October 04, 2001 10:34 AM
> To: Access ASP
> Subject: [access_asp] drop down list with asp
>
>
> I am sort of new to asp and hope someone will answer this really easy ?
>
> I have code below:
>
> response.write"<SELECT name='Selpage'>"
> response.write" <option value='Voy'>Voyage</OPTION>"
> response.write"<OPTION value ='PtDis'>Ports of Discharge</OPTION>"
> response.write"<OPTION value ='A&EPtDis' >Add/Edit Port of
> Discharge</OPTION>"
> response.write"<OPTION value='A&EBOL'>Add/Edit Bill of Lading</OPTION>"
> response.write"<OPTION value='BOLCon'>Bill of Lading
Containers</OPTION>"
> response.write"<OPTION value='ConDet'>Container Details</OPTION>"
> response.write"<OPTION value='ConChg'>Container Charges</OPTION>"
> response.write"<OPTION value='ConRem'>Container Remarks</OPTION>"
> response.write "</SELECT>"
>
>
> I am trying to let the user pick from list above and then they hit a
> button but it does not keep the value they pick.
>
> I have tried option selected= "& Request("Selpage")&" but it does not
work.
>
> also tried
>
> if len(request("Selpage") > 0
>
> or
>
> if request("Selpage") = "PtDis then ....
>
> i thank you for your time!
>
> SB
|
|
 |