Trouble with multiple select box

Posted on 2005-04-11
Last Modified: 2012-05-05
Once I hit submit my next page can not find data with in my multiple text box.  Here is my code.   Can someone help me find out why they will not show up with POST method.

<title>Change/Alter User</title>
<SCRIPT LANGUAGE="JavaScript" SRC="./selectbox.js"></SCRIPT>
    <td align="center">
      <h2>Change/Alter User</h2>
    <td align="center">
      <table border='0'>
           <td><b>User Id:</b>&nbsp;&nbsp;userid</td>
             <form method='POST' action='./user.php?update=Y' name='cruser'>
             <INPUT TYPE="hidden" NAME="movepattern1" VALUE="">
             <table border='0'>
                  <td><b>Do Not Belong To</b></td>
                  <td><b>Currently Belong To</b></td>
                  <td valign='top'>
                     <select name='list1[]' multiple="yes" size='9' style='width: 200'
                       <option value='Buyers'>Buyers</option>
                       <option value='Program Developers'>Program Developers</option>
                       <option value='District-Regional Managers'>District-Regional Managers</option>
                       <option value='Executives'>Executives</option>
                       <option value='POS Department'>POS Department</option>
                       <option value='Stores'>Stores</option>
                  <td><input type='button' value='>' style='width: 25'
                       <input type='button' value='>>' style='width: 25'
                       <input type='button' value='<' style='width: 25'
                       <input type='button' value='<<' style='width: 25'
                   <td valign='top' align='left'>
                       <select name='list2[]' multiple="yes" size='9' style='width: 200'
                         <option value='Accounts Receivable'>Accounts Receivable</option>
                         <option value='Web Administration'>Web Administration</option>
                         <option value='Database Administration'>Database Administration</option>
                 <tr><td colspan='3' align='center'><br>
                     <input type='hidden' name='allgrpcount' value='6'>
                     <input type='hidden' name='curgrpcount' value='3'>
                     <input type='submit' value = 'Update User'></td></tr>

The next page is this

echo "$list2[1]";

still nothing shows up.


Question by:jmsloan
    1 Comment
    LVL 3

    Accepted Solution

    I figured it out.  When I was hitting the submit button none of the entries in list2 were selected.  So i will add javascript to select all in list2 onSubmit

    Featured Post

    Easy Project Management (No User Manual Required)

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    Introduction Many web sites contain image galleries; a common design for these galleries includes a page with a collection of thumbnail images.  You can click on each of the thumbnail images to see the larger version of the image.  This is easily i…
    I imagine that there are some, like me, who require a way of getting currency exchange rates for implementation in web project from time to time, so I thought I would share a solution that I have developed for this purpose. It turns out that Yaho…
    Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
    The viewer will learn how to count occurrences of each item in an array.

    746 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now