max tegn på javascript
Der skal være et max på 160 tegn (sms)<script language=\"JavaScript\">
<!--
function copy(f) {
var i=f.s1.selectedIndex;
if (i>=0) {
f.s2.options[f.s2.options.length]=new Option(f.s1[i].text,f.s1[i].value);
}
f.s1.selectedIndex=-1;
f.s2.selectedIndex=-1;
}
function del(f) {
var i=f.s2.selectedIndex;
if (i>=0) {
var len=f.s2.options.length;
for (j=i;j<len-1;j++) {
f.s2.options[j].value=f.s2.options[j+1].value;
f.s2.options[j].text=f.s2.options[j+1].text;
}
f.s2.options.length--;
}
f.s1.selectedIndex=-1;
f.s2.selectedIndex=-1;
}
//-->
</script><body bgcolor=\"#FFFFFF\">
<form method=post action=\"\">
<select name=\"s1\" style=\"width: 500px\" onChange=\"copy(this.form);\" size=\"1\">
<option value=\"1\" selected>Æbler</option>
<option value=\"2\">Bananer</option>
<option value=\"3\">Pærer</option>
<option value=\"4\">Appelsiner</option>
</select>
<br>
<select name=\"s2\" size=\"3\" style=\"width: 500px\" onChange=\"del(this.form);\">
</select>
</form></body>
</body>
</html>
<script language=\"JavaScript\">
<!--
function copy(f) {
var i=f.s1.selectedIndex;
if (i>=0) {
f.s2.options[f.s2.options.length]=new Option(f.s1[i].text,f.s1[i].value);
}
f.s1.selectedIndex=-1;
f.s2.selectedIndex=-1;
}
function del(f) {
var i=f.s2.selectedIndex;
if (i>=0) {
var len=f.s2.options.length;
for (j=i;j<len-1;j++) {
f.s2.options[j].value=f.s2.options[j+1].value;
f.s2.options[j].text=f.s2.options[j+1].text;
}
f.s2.options.length--;
}
f.s1.selectedIndex=-1;
f.s2.selectedIndex=-1;
}
//-->
</script><body bgcolor=\"#FFFFFF\">
<form method=post action=\"\">
<select name=\"s1\" style=\"width: 500px\" onChange=\"copy(this.form);\" size=\"1\">
<option value=\"1\" selected>Æbler</option>
<option value=\"2\">Bananer</option>
<option value=\"3\">Pærer</option>
<option value=\"4\">Appelsiner</option>
</select>
<br>
<select name=\"s2\" size=\"3\" style=\"width: 500px\" onChange=\"del(this.form);\">
</select>
</form></body>
</body>
</html>