#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2003
    Posts
    2
    Rep Power
    0

    list box selection


    i
    I have a form with list, select and radio buttons eack has onclick event to post itself and populate from the database depend on radio button selected.
    When i select multiple selection then onclick a radio button the form is posting itself then do more selections on other fields. At the mean time I need the one's selected in multiple list box need to be selected.
    This is the code I tried. it is working only I select one,but if I select multiple it is not working How I can do this.


    <select name="lis_anaAuctionLoc" multiple class="small" size="5">
    <cfoutput>
    <cfloop query="getAuctionLocationQuery">
    <cfif isDefined('form.typeReport') and (form.typeReport eq "National Total Sales Performance" or form.typeReport eq "Regional Sales Performance")>
    <option value="#trim(getAuctionLocationQuery.gsaulc)#" selected>#trim(getAuctionLocationQuery.gsaulc)#</option>
    <cfelse>
    <option value="#trim(getAuctionLocationQuery.gsaulc)#" <cfif isDefined('form.lis_anaAuctionLoc')> <cfif form.lis_anaAuctionLoc eq "#trim(getAuctionLocationQuery.gsaulc)#">selected</cfif></cfif>>#trim(getAuctionLocationQuery.gsaulc)#</option>
    </cfif>
    </cfloop>
    </cfoutput> </select>
  2. #2
  3. No Profile Picture
    Moderator

    Join Date
    Jun 2002
    Location
    Raleigh, NC
    Posts
    5,264
    Rep Power
    968
    Ragga, I can't tell from your description or your code what you are trying to do. The user selects one or more items from the select box and then clicks a radio button. The radio button posts the select box data and the radio button choice to the database, and then the page redisplays. And you want to have the select box items and the radio button that the user had chosen be selected when the page reloads? Is that right?

IMN logo majestic logo threadwatch logo seochat tools logo