[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Trouble with multiple select box

Posted on 2005-04-11
2
Medium Priority
?
534 Views
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.

<html>
<head>
<title>Change/Alter User</title>
<SCRIPT LANGUAGE="JavaScript" SRC="./selectbox.js"></SCRIPT>
</head>
<body>
<center>
<table>
  <tr>
    <td align="center">
      <h2>Change/Alter User</h2>
  </tr>
  <tr>
    <td align="center">
      <table border='0'>
        <tr>
           <td><b>User Id:</b>&nbsp;&nbsp;userid</td>
        </tr>
        <tr>
           <td>
             <form method='POST' action='./user.php?update=Y' name='cruser'>
             <INPUT TYPE="hidden" NAME="movepattern1" VALUE="">
             <table border='0'>
               <tr>
                  <td><b>Do Not Belong To</b></td>
                  <td>&nbsp;</td>
                  <td><b>Currently Belong To</b></td>
               </tr>
               <tr>
                  <td valign='top'>
                     <select name='list1[]' multiple="yes" size='9' style='width: 200'
                       onDblClick="moveSelectedOptions(document.cruser['list1[]'],document.cruser['list2[]'],true,document.cruser['movepattern1'].value)">
                       <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>
                     </select>
                  </td>
                  <td><input type='button' value='>' style='width: 25'
                        ONCLICK="moveSelectedOptions(document.cruser['list1[]'],document.cruser['list2[]'],true,document.cruser['movepattern1'].value)"><br>
                        <br>
                       <input type='button' value='>>' style='width: 25'
                           ONCLICK="moveAllOptions(document.cruser['list1[]'],document.cruser['list2[]'],true,document.cruser['movepattern1'].value)"><br>
                        <br>
                       <input type='button' value='<' style='width: 25'
                           ONCLICK="moveSelectedOptions(document.cruser['list2[]'],document.cruser['list1[]'],true,this['form'].movepattern1.value)"><br>
                        <br>
                       <input type='button' value='<<' style='width: 25'
                           ONCLICK="moveAllOptions(document.cruser['list2[]'],document.cruser['list1[]'],true,document.cruser['movepattern1'].value)"></td>
                   <td valign='top' align='left'>
                       <select name='list2[]' multiple="yes" size='9' style='width: 200'
                         onDblClick="moveSelectedOptions(document.cruser['list2[]'],document.cruser['list1[]'],true,document.cruser['movepattern1'].value)">
                         <option value='Accounts Receivable'>Accounts Receivable</option>
                         <option value='Web Administration'>Web Administration</option>
                         <option value='Database Administration'>Database Administration</option>
                        </select>
                   </td>
                 </tr>
                 <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>
             </table>
        </form>
      </td>
    </tr>
  </table>
 </td>
 </tr>
</table>
</center>
</body>
</html>

The next page is this

echo "$list2[1]";

still nothing shows up.

Thanks,

jmsloan
0
Comment
Question by:jmsloan
1 Comment
 
LVL 3

Accepted Solution

by:
jmsloan earned 0 total points
ID: 13757166
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
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
It’s a season to be thankful, and we’re thankful for users like you who engage on site, solve technology problems, and network with others in the industry. What tech are we most thankful for? Keep reading.
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
Suggested Courses
Course of the Month18 days, 17 hours left to enroll

834 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