Drop down box

B

Bahram

Hi;
My customer selects an option from a drop down box
named "DEPT" with option of "BAGS" and "BELTS". After
selection, I want to tell them that they have
selected "BAGS" or ..
What is the syntax for the selected value?
I have tried the followings but none worked"
<% respone.write(DEPT.value.option) %>
<% respone.write(DEPT.value) %>
<% respone.write(DEPT) %>
Thanks in advance
 
J

Jim Buyens

-----Original Message-----
Hi;
Howdy.

My customer selects an option from a drop down box
named "DEPT" with option of "BAGS" and "BELTS". After
selection, I want to tell them that they have
selected "BAGS" or ..
What is the syntax for the selected value?

<select size="1" name="dept">
<option value="bags" <%
if request("dept") = "bags" then
response.write "selected"
end if
%>>Bags</option>
<option value="belts"<%
if request("dept") = "belts" then
response.write "selected"
end if
%>>Belts</option>
</select>

Jim Buyens
Microsoft FrontPage MVP
http://www.interlacken.com
Author of:
*----------------------------------------------------
|\---------------------------------------------------
|| Microsoft Office FrontPage 2003 Inside Out
|| Microsoft FrontPage Version 2002 Inside Out
|| Web Database Development Step by Step .NET Edition
|| Troubleshooting Microsoft FrontPage 2002
|| Faster Smarter Beginning Programming
|| (All from Microsoft Press)
|/---------------------------------------------------
*----------------------------------------------------
 
G

Guest

-----Original Message-----
Hi;
My customer selects an option from a drop down box
named "DEPT" with option of "BAGS" and "BELTS". After
selection, I want to tell them that they have
selected "BAGS" or ..
What is the syntax for the selected value?
I have tried the followings but none worked"
<% respone.write(DEPT.value.option) %>
<% respone.write(DEPT.value) %>
<% respone.write(DEPT) %>
Thanks in advance
.
Thanks Jim. I got more than I asked for. Thanks for the
codes.
 

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

Top