Code:
<HTML><HEAD><TITLE>ListBoksovi</TITLE>
<META content="text/html; charset=windows-1250" http-equiv=Content-Type>
<SCRIPT language=JavaScript>
function premesti(source, destination, duzina) {
function postoji(datiText, index){
var i=0
while (i<destination.length){
if (destination.options[i].text==datiText){
source.options[index].selected=false
return true
}
i++
}
return false
}
var difLen=duzina
for (var i=0; i<source.length; i++){
if ((source.options[i].selected) && !(postoji(source.options[i].text, source.options[i].index))){
destination.options[difLen++]=new Option(source.options[i].text)
source.options[i].selected=false
}
}
}
function brisi(destination){
var i=0
while(i<destination.length){
if (destination.options[i].selected){
destination.options[i]=null
}
else i++
}
}
function dodaj(){
...
}
</SCRIPT>
<META content="MSHTML 5.00.3700.6699" name=GENERATOR></HEAD>
<BODY>
<FORM action=dbwrite.php method=post name="form1" onSubmit="dodaj()">
<TABLE width=600 align=center>
<TR>
<TD align=left rowSpan=2 width="42%"><SELECT multiple name=postojeci
size=6 style="WIDTH:100%"> <OPTION>Item1</OPTION>
<OPTION>Item2</OPTION> <OPTION>Item3</OPTION> <OPTION>Item4</OPTION>
<OPTION>Item5</OPTION> <OPTION>Item6</OPTION></SELECT>
<TD align=center width="4%"><INPUT name=gumb1 onclick=brisi(this.form.potrebni) type=button value=" < ">
<TD align=right rowSpan=2 width="42%"><SELECT multiple="multiple" name=potrebni[]
size=6 style="WIDTH:100%"></SELECT>
<TR>
<TD align=center width="4%"><INPUT name=gumb2 onclick="premesti(this.form.postojeci, this.form.potrebni, this.form.potrebni.length)" type=button value=" > ">
</SELECT></TR>
</TABLE>
<CENTER><INPUT type=submit value=Pošalji name=send>
</FORM></BODY></HTML>
<HTML><HEAD><TITLE>ListBoksovi</TITLE>
<META content="text/html; charset=windows-1250" http-equiv=Content-Type>
<SCRIPT language=JavaScript>
function premesti(source, destination, duzina) {
function postoji(datiText, index){
var i=0
while (i<destination.length){
if (destination.options[i].text==datiText){
source.options[index].selected=false
return true
}
i++
}
return false
}
var difLen=duzina
for (var i=0; i<source.length; i++){
if ((source.options[i].selected) && !(postoji(source.options[i].text, source.options[i].index))){
destination.options[difLen++]=new Option(source.options[i].text)
source.options[i].selected=false
}
}
}
function brisi(destination){
var i=0
while(i<destination.length){
if (destination.options[i].selected){
destination.options[i]=null
}
else i++
}
}
function dodaj(){
...
}
</SCRIPT>
<META content="MSHTML 5.00.3700.6699" name=GENERATOR></HEAD>
<BODY>
<FORM action=dbwrite.php method=post name="form1" onSubmit="dodaj()">
<TABLE width=600 align=center>
<TR>
<TD align=left rowSpan=2 width="42%"><SELECT multiple name=postojeci
size=6 style="WIDTH:100%"> <OPTION>Item1</OPTION>
<OPTION>Item2</OPTION> <OPTION>Item3</OPTION> <OPTION>Item4</OPTION>
<OPTION>Item5</OPTION> <OPTION>Item6</OPTION></SELECT>
<TD align=center width="4%"><INPUT name=gumb1 onclick=brisi(this.form.potrebni) type=button value=" < ">
<TD align=right rowSpan=2 width="42%"><SELECT multiple="multiple" name=potrebni[]
size=6 style="WIDTH:100%"></SELECT>
<TR>
<TD align=center width="4%"><INPUT name=gumb2 onclick="premesti(this.form.postojeci, this.form.potrebni, this.form.potrebni.length)" type=button value=" > ">
</SELECT></TR>
</TABLE>
<CENTER><INPUT type=submit value=Pošalji name=send>
</FORM></BODY></HTML>