hallo hartmann,
gruss WAY_KOW,
hatte auch was dazu geschrieben - will es jetzt auch loswerden:
viel spass:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>multipleSelect.html</title>
<script type="text/javascript">
<!--
function changeDescription() {
var choiceField = document.forms["coolStuff"].elements["choice"];
var descrpField = document.forms["coolStuff"].elements["description"];
var chosenArray = new Array();
var autoIndex = -1;
var theText = "";
for (var i=0;i<choiceField.options.length;i++) {
if (choiceField.options[i].selected) {
chosenArray[++autoIndex] = i;
}
}
// alert(chosenArray.toString());
for (var i=0;i<chosenArray.length;i++) {
theText += "- " + choiceField.options[chosenArray[i]].text + "\n";
}
theText = theText.substring(0,theText.length-1);
descrpField.value = theText;
}
//-->
</script>
</head>
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" rightmargin="0" bottommargin="0">
<table cols="1" rows="1" width="100%" height="100%" cellspacing="0" cellpadding="0" border="0">
<tr>
<td align="center" valign="middle">
<form name="coolStuff">
<table cols="1" rows="1" width="100" cellspacing="0" cellpadding="10" border="0">
<tr>
<td align="left" valign="top">
<select name="choice" size="8" onchange="changeDescription()" multiple>
<option value="sesameStreet" />Sesame Street
<option value="spielhaus" />Spielhaus
<option value="winnieThePooh" />Winnie The Pooh
<option value="pittiplatsch" />Pittiplatsch
<option value="tabaluga" />Tabaluga
<option value="gixgax" />Gix Gax
<option value="dieSendungMitDerMaus" />die Sendung mit der Maus
<option value="brummkreisel" />Brummkreisel
</select>
</td>
<td align="left" valign="top">
<textarea name="description" cols="27" rows="8" wrap="physical"></textarea>
</td>
</tr>
</table>
</form>
</td>
</tr>
</table>
</body>
</html>
by(t)e by(t)e - peterS. - pseliger@gmx.net