Hi
From a javascript function I try to set a value from a dropdownmenu to a textbox, but I get this error message saying that:
document.mailForm.txtFrom is null or not an object
What am I doing wrong?
/Moorstream
Moderators: macek, egami, gesf

<script language="javascript">
<!-- Begin
function FillTextArea () {
var selection = document.MyForm.MySelectBox.value;
document.MyForm.MyTextArea.value = selection;
/* If you want to add the values on, use:
var selection = document.MyForm.MySelectBox.value;
var textarea_contents = document.MyForm.MyTextArea.value;
document.MyForm.MyTextArea.value = textarea_contents + selection + " ";
*/
}
// -->
</script>
<form name="MyForm">
<select name="MySelectBox" onchange="javascript:FillTextArea()">
<option value="">Please Select</option>
<option value="The">The</option>
<option value="Monkey">Monkey</option>
<option value="Eats">Eats</option>
<option value="Bananas">Bananas</option>
</select>
<textarea name="MyTextArea"></textarea>
</form>

Users browsing this forum: No registered users and 1 guest