Proble with Menu List and text box Display
Posted: Fri Jul 18, 2003 8:47 am
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: Select all
<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>