JavaScript error - is null or not an object

I get this error with the code below - 'DialogHistory.value is null or not an object.

var f = document.forms[0]

var w = window.opener.document.forms[0]

if(w.Form.value == “Dialog”){

alert("Dialog")

alert(w.Subject.value)

f.Subject.value = "RE: " + w.Subject.value

//alert("test: " + w.DialogHistory.value)

f.DialogHistory.value =  w.DialogHistory.value

}

On the opener form (aka Dialog) the dialogHistory is a Text field. When that document is saved an agent (LotusScript) runs and takes the ResponseAuthor field and the Body (RICHTEXT) field and creates the DialogHistory field ie: “Mike Zens - blah blah blah blah”. I use the RTItem.Text method to get the Body data. When a user needs to respond to the original document on the web they select a hotspot that opens up the response form (aka Reponse) which the code abve is in the onLoad event. It brings over the Subject from the opener but bombs out when trying to access the DialogHistory UNLESS I dont populate the Body data into the DialogHistory of the Dialog document. ie: "Mike Zens - ". The dialogHistory field type is Text in the Notes Properties of the Dialog Document. It is also a field of Text type in the Reponse Document. Any ideas why this is happening and how to correct my code to prevent it from happening?

Thanks for your time - Mike

Subject: JavaScript error - is null or not an object

What type of field is DialogHistory? editable? computed?