Re: de-focusing a control in a web page
From: Igor Tandetnik (itandetnik_at_mvps.org)
Date: 03/21/05
- Next message: AMercer: "Re: de-focusing a control in a web page"
- Previous message: Jim McC: "waiting for custom IE print templates to complete - how?"
- In reply to: AMercer: "Re: de-focusing a control in a web page"
- Next in thread: AMercer: "Re: de-focusing a control in a web page"
- Reply: AMercer: "Re: de-focusing a control in a web page"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 21 Mar 2005 10:17:58 -0500
"AMercer" <AMercer@discussions.microsoft.com> wrote in message
news:11322459-A01A-463B-9195-2EBB8C7E6CB7@microsoft.com
> thanks, but no joy - the closest I could come to
> document.body.focus()
> was
> Dim doc As mshtml.HTMLDocumentClass = _
> CType(AxWebBrowser1.Document, mshtml.HTMLDocumentClass)
> doc.focus()
>
> In the syntax of your suggestion,
> document.body.focus()
> I find that document.body has no such method focus(), and FYI
> document dows have property body and method focus().
body is a property of the document object, and is itself an object. Once
you retrieve the reference to body element, you cast it to IHTMLElement2
which has focus() method
--
With best wishes,
Igor Tandetnik
With sufficient thrust, pigs fly just fine. However, this is not
necessarily a good idea. It is hard to be sure where they are going to
land, and it could be dangerous sitting under them as they fly
overhead. -- RFC 1925
- Next message: AMercer: "Re: de-focusing a control in a web page"
- Previous message: Jim McC: "waiting for custom IE print templates to complete - how?"
- In reply to: AMercer: "Re: de-focusing a control in a web page"
- Next in thread: AMercer: "Re: de-focusing a control in a web page"
- Reply: AMercer: "Re: de-focusing a control in a web page"
- Messages sorted by: [ date ] [ thread ]