i have created 1 drop-down list when i click the value it should remove from dropdown n store in another field.. And when i double click the value in that field it should go back to the drown list.
give me some idea please
i have created 1 drop-down list when i click the value it should remove from dropdown n store in another field.. And when i double click the value in that field it should go back to the drown list.
give me some idea please
A trivial example is:
<script type="text/javascript">
function handleClick(e, listElement) {
// Get the element that was clicked on
var el = e.target || e.srcElement;
// If the element has class 'item' ...
if (el && /item/.test(el.className)) {
// Move it from its current list to the other one
if (listElement.id == 'list-0') {
document.getElementById('list-1').appendChild(el);
} else {
document.getElementById('list-0').appendChild(el);
}
}
}
</script>
<ul id="list-0" onclick="handleClick(event, this);">
<li class="item">apple
<li class="item">orange
<li class="item">banana
</ul>
<ul id="list-1" onclick="handleClick(event, this);">
<li>add stuff here...
</ul>
Of course there is an awful lot required to make the above anything like useful in a web page.