Hello,
Basically, I have a select which is being filled in dynamically.
I would like the user to be able to sort this list as he wants (using drag and drop)… but I don’t have a clue how to do it.
I have been told that I can use “scriptaculous” but I cannot manage to make it work with select. The thing is that I cannot use it with a <ul> list since I need to be able to select an item by clicking on it.
Could you please help me?
I have simplified the code…
[code]
<html>
<head>
<script language=JavaScript>
function getSelect(s)
{
alert(“selectedOptionText=”+s.options[s.selectedIndex].text);
}
</script>
<body>
<form onSubmit=”return false” method=”post” name=”myForm” action=””>
<table border=”2″>
<tbody>
<tr><th>Services</th></tr>
<tr>
<td><select name=”service_list” size=5 style=”width:150px” onClick=”getSelect(this)”>
<option value=”something1″>S1</option>
<option value=”something2″>S2</option>
</select>
</td></tr>
</tbody>
</table>
</form>
</body>
</html>