taki kod zrobiłem:
<script type="text/javascript"> function dodaj() { // z to do from // usuwamy z from var x=document.getElementById('co'); var y=document.getElementById('gdzie'); y.options[y.length] = new Option(x.options[x.selectedIndex].text,x.options[x.selectedIndex].value); x.remove(x.selectedIndex); for (i=0;i<=100;i++) { y.options[y.length-1].selected = true; } } function usun() { var x=document.getElementById('gdzie'); var y=document.getElementById('co'); y.options[y.length] = new Option(x.options[x.selectedIndex].text,x.options[x.selectedIndex].value); x.remove(x.selectedIndex); for (i=0;i<=x.length;i++) { x.options[i].selected = true; } } function dodajTag() { // z to do from // usuwamy z from var x=document.getElementById('newtag'); var y=document.getElementById('gdzie'); var z=document.getElementById('co'); y.options[y.length] = new Option(x.value,x.value); // zapis do bazy ad = 'addtags.php?FOR='; ajaxpage(ad+x.value,'div_add_tag','utf-8') // zaznacz wszystko for (i=0;i<=100;i++) { y.options[y.length-1].selected = true; } // liczymy for (i=0;i<=z.length;i++) { if (z.options[i]==x.value) { alert("Tag wystepuje"); } } } </script>
ma ktos jakis pomysł nie chce korzystac z innych framwerkow js wiec advajax itp nie wchodzą w gre.