| Author |
List Box problem
|
Giri Mysore
Greenhorn
Joined: May 12, 2003
Posts: 1
|
|
I have two list boxes i am moving selected data from box1 to box2. When i try to read box2 value at server side i am not getting that. But i am getting box1 values. Here is the code. Vector travelStaffVector = TravelStaffCollection.travelStaffCollection; for (int i = 0; i < travelStaffVector.size(); i++) { %> <option VALUE="<%=((TravelStaff)travelStaffVector.elementAt(i)).getAssociateID()%>" > <%=((TravelStaff)travelStaffVector.elementAt(i)).getFirstName() + " " + ((TravelStaff)travelStaffVector.elementAt(i)).getLastName()%> </option> <% } %> </select> </td> <td> <a href="javascript:moveIt( newassignmentform.fieldFrom, newassignmentform.fieldTo )">>></a> <br> <a href="javascript:moveIt( newassignmentform.fieldTo, newassignmentform.fieldFrom )"><<</a> </td> <td><p class="celltxt"><b>Selected Travel Staff:<br> <select name="fieldTo" size="5" style="width:200;"> <option VALUE="">return javascript:moveIto( newassignmentform.fieldFrom, newassignmentform.fieldTo ) </option> </select> Here is javascripts function bumpUp( box ) { for( var i=0; i<box.options.length; i++ ) { if( box.options[i].value == "" ) { for( var j=i; j<box.options.length-1; j++ ) { box.options[j].value = box.options[j+1].value; box.options[j].text = box.options[j+1].text; } var ln = i; break; } } if( ln < box.options.length ) { box.options.length -= 1; bumpUp( box ); } }
|
 |
 |
|
|
subject: List Box problem
|
|
|