I was wondering if it is possible to set focus from the object level. I've tried but maybe I'm just calling it wrong. To set the focus on "textbox1" I tried variations of the following (below).
The reason I am attempting this via the object layer is that I need a function that will dynamically redirect my focus via a function call to multiple different items on the page. AND instead of having a crudload of "document.textbox1.focus" IF/Then statements, I figured I would try manuevering thru the object layer on the DOM in one single function call passing the name of the item to focus on as a string to the function.
Any help appreciated.
Rock6431
Dim objElement
strITEM = "textbox1"
Set objElement = document.all(strITEM)
objElement.focus
???
The reason I am attempting this via the object layer is that I need a function that will dynamically redirect my focus via a function call to multiple different items on the page. AND instead of having a crudload of "document.textbox1.focus" IF/Then statements, I figured I would try manuevering thru the object layer on the DOM in one single function call passing the name of the item to focus on as a string to the function.
Any help appreciated.
Rock6431
Dim objElement
strITEM = "textbox1"
Set objElement = document.all(strITEM)
objElement.focus
???