Thanks Adam that does work. I just added something like this into the sample dialog var editor1 function body_onload() { editor1=Window_GetDialogArguments(window); ....
However it doesn't do exactly what I hoped. I will post a different question since the subject has changed.