<script type="text/javascript">
$('#bt').click(function(){
$('#param2Select option:selected').appendTo('#dest');
});
</script>
<span class="param1Label"><b>Country</b></span>
<span id="param1Select"></span>
<span class="param2Label"><b>State</b></span>
<span id="param2Select">
<!--<select id="sada" multiple=""></select> --></span>
<input type="button" id="bt" value='>'>
<select id="dest" multiple="">
</select>
I'm taking 2 built in selections for performing cascading selection(1st one is simple select and next one is multi select).. Up this is fine & no issues.
What I am trying is , I have to move the selected values in 2nd drop down to a custom drop down(3rd drop down). For that I'm writing the above code but unable to get succeed.
In JSFiddle ediot below code is working with out any issue for the same..
<select id='add' multiple>
<option value="volvo">Volvo</option>
<option value="saab">Saab</option>
<option value="opel">Opel</option>
<option value="audi">Audi</option>
</select>
<input type="button" id="bt" value='>'>
<select id="dest" multiple>
</select>
$('#bt').click(function(){
$('#add option:selected').appendTo('#dest');
});
1) Not able to get the id of multi select component (used firebug)..
2) How can I use the id's of pre-given drop downs to map with custom driven drop downs to move the data ?
Thank you :-)
Sadakar
$('#bt').click(function(){
$('#param2Select option:selected').appendTo('#dest');
});
</script>
<span class="param1Label"><b>Country</b></span>
<span id="param1Select"></span>
<span class="param2Label"><b>State</b></span>
<span id="param2Select">
<!--<select id="sada" multiple=""></select> --></span>
<input type="button" id="bt" value='>'>
<select id="dest" multiple="">
</select>
I'm taking 2 built in selections for performing cascading selection(1st one is simple select and next one is multi select).. Up this is fine & no issues.
What I am trying is , I have to move the selected values in 2nd drop down to a custom drop down(3rd drop down). For that I'm writing the above code but unable to get succeed.
In JSFiddle ediot below code is working with out any issue for the same..
<select id='add' multiple>
<option value="volvo">Volvo</option>
<option value="saab">Saab</option>
<option value="opel">Opel</option>
<option value="audi">Audi</option>
</select>
<input type="button" id="bt" value='>'>
<select id="dest" multiple>
</select>
$('#bt').click(function(){
$('#add option:selected').appendTo('#dest');
});
1) Not able to get the id of multi select component (used firebug)..
2) How can I use the id's of pre-given drop downs to map with custom driven drop downs to move the data ?
Thank you :-)
Sadakar