Thursday, November 26, 2009

Multiple Select boxes in Js

I have gone through many examples for multiple select like this.

& what worked for me is i have given below,

Download the Js & Css from the above link.

Create a HTML file like this,

<script src="javascripts/moo.js" type="text/javascript"></script>
<script src="javascripts/multi_transfer.js" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" href="stylesheets/multiple.css" />

<td align="center">
<div class="holder" > <p>Exam List</p>
<select multiple="multiple" id="select1" name="select1[]">

<option value="1">one1</option>
<option value="2">one2</option>
<option value="3">one3</option>
<option value="4">one4</option>
<option value="5">one5</option>

<a href="javascript:;" id="add">add >></a>
<td align="center">
<div class="holder"><p>Selected Exam </p>
<select multiple="multiple" id="select2" name="selected_exam_list[]">
<a href="javascript:;" id="remove"><< remove</a>

Reference & Demo :


No comments: