1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
|
<!--
function push_option(from, to) {
var form_name="einteilung";
var selected_Index = document.forms[form_name].elements[from].selectedIndex;
/*
Selectliste
*/
var neue_option = document.createElement("option");
var attr_value = document.createAttribute("value");
attr_value.nodeValue = document.forms[form_name].elements[from].options[selected_Index].value;
neue_option.setAttributeNode(attr_value);
var namenstext = document.createTextNode(document.forms[form_name].elements[from].options[selected_Index].text);
neue_option.appendChild(namenstext);
var ausgabe = document.getElementById(to);
ausgabe.appendChild(neue_option);
var eventhandler = document.createAttribute("ondblclick");
eventhandler.nodeValue = "push_option('"+to+"','"+from+"')";
neue_option.setAttributeNode(eventhandler);
document.forms[form_name].elements[to].options[document.forms[form_name].elements[to].length - 1].selected = true;
/*
geklickte Option löschen
*/
document.forms[form_name].elements[from].options[selected_Index] = null;
}
--></script>
<form name="einteilung">
<select size="5" name="nicht_noetig" id="role_src" >
<option value="1" ondblclick="push_option('role_src', 'role_tgt')">Name 1</<option>
<option value="2" ondblclick="push_option('role_src', 'role_tgt')">Name 2</<option>
</select>
<select size="5" name="roles[]" id="role_tgt" multiple disabled>
</select>
</form> |