I have done very little work with the OM or the DOM, but the basics as I undertstand them are similar to the way your refrence a form withing vfp itself,
document.form.formitem = value
or a snip from one of html codes where I refrece the dom.
document.myform.w_name.focus()
this sets focus to the form var named w_name
but in order for this to start to work for you. you have to name your form, to give it a refrence.
I hope I am not too far off track here with what you are attemping to get a hold of.
Bob Lee
In the beginning, there was a command prompt, and all was well.