I only want to execute this if the value of description field is empty which is the case when adding new record.
this code is in visual editor html mode .
the code is always ignored.
<script>
if document.forms.editform.value_description.value == null
{
document.forms.editform.value_description.value = document.forms.editform.display_value_tcode.value;
document.forms.editform.value_tcode.onchange = function()
{
document.forms.editform.value_description.value = document.forms.editform.display_value_tcode.value;
}
}
</SCRIPT>