Wrox Programmer Forums
|
ASP Forms As of Oct 5, 2005, this forum is now locked. Please use "Classic ASP beginner" at http://p2p.wrox.com/forum.asp?FORUM_ID=54 or "Classic ASP Professional" http://p2p.wrox.com/forum.asp?FORUM_ID=56 instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP Forms section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 26th, 2004, 05:45 PM
Authorized User
 
Join Date: Jun 2003
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Default Link Selection box choice

On my form I have a drop down selection box that will be populated with a list retrieved from a recordset. I would like to link each selection in the list so if I click on the link, it will go to the next page bringing along the value I clicked on using querystring or any other method that will work better. See code below
Thanks

<Form>
Type
    <select Name="TypeCode" Size="1">
        <option Value SELECTED></option>
        <%While not oRS30.EOF %>
        <option Value="<%Response.Write oRS30("TypeCode").Value %>">
                                        <a href='33EditMEID.asp?TypeCode=<%Response.Write oRS30("TypeCode").Value %>></option></A>
        <%Response.Write "<BR>"
             oRS30.MoveNext
         Wend%>
    </select>
</Form>
 
Old February 26th, 2004, 06:11 PM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

What you need to do is make the select box auto submit the form and the selector value will appear on the query string.

<Form action="33EditMEID.asp" method="get">
    Type
    <select Name="TypeCode" Size="1" onChange="this.form.submit();">
        <option Value SELECTED></option>
        <%While not oRS30.EOF %>
            <option Value="<%=oRS30("TypeCode").Value%>"><%=oRS30("Typ eCode").Value%></option>
            <%oRS30.MoveNext
        Wend%>
    </select>
</Form>

Peter
------------------------------------------------------
Work smarter, not harder.
 
Old February 26th, 2004, 06:48 PM
Authorized User
 
Join Date: Jun 2003
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Works great thanks
Dale





Similar Threads
Thread Thread Starter Forum Replies Last Post
Different subforms depending on combo box choice stevensj5 Access 5 October 3rd, 2007 08:54 PM
Combo box choice creating filtered combo box stevensj5 Access 11 September 13th, 2007 11:33 AM
How to link to other page with Choice List? hlchuah77 Java GUI 0 September 12th, 2004 02:16 PM
Populate List Box by Combo Box Selection mmcdonal Access 2 June 15th, 2004 12:08 PM
Find Record Combo Box Wizard Won't Show 3rd Choice HenryE Access 0 February 2nd, 2004 11:52 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.