I am having problem with this code. whenever I am selecting any item from list, it’s showing undefined in the text box. So could you plese have a look and let me know what do do? Thank you.
[code=php]
<html>
<head>
<title>
</title>
</head>
<script>
function copythis(str)
{
document.myform.copied.value += str;
}
</script>
<form name=’myform’>
<?php
$Domain_Name[] = Cricket;
$Domain_Name[] = Soccer;
$Domain_Name[] = TableTennis;
$Domain_Name[] = Chess;
?>
<br>
<input type=’text’ name=’copied’ value=”>
<select name = “InputDomainMenu[]” Multiple onchange=”copythis(this.selectedvalue);”>
<?php
foreach ($Domain_Name as $Existing_Item)
print “<option value='{$Existing_Item}’>{$Existing_Item}</option>”;
?>
</form>
</html>