C
Csaba Gabor
Subject to the popup blocker, the code below will bring up
two instances of IE. The first one is identified by the
variable ie below. What is the cleanest way to get
ahold of the second one that gets created in the
last line (lnk.click)?
Also, is there a cleaner way to force ie to bring
up the new page in a new IE besides modifying
the DOM (by putting in lnk.target = "_blank")?
What I'm getting at by this is a possible snythetic
click.
Thanks for any ideas,
Csaba Gabor from Vienna
PS. I know that I can explicitly create an IE and then
tell it to Navigate2 to site implied by the lnk.href,
but I'd rather have IE do the work for me.
Set ie=CreateObject("InternetExplorer.Application")
ie.visible=true
ie.Navigate2 ("about:blank")
While ie.ReadyState<4: WScript.Sleep 200: Wend
demoPage = _
"<a id=mylink href='http://google.com'>foo</a>"
ie.document.body.innerHTML = demoPage
Set lnk = ie.document.getElementById("mylink")
lnk.target = "_blank"
lnk.click
two instances of IE. The first one is identified by the
variable ie below. What is the cleanest way to get
ahold of the second one that gets created in the
last line (lnk.click)?
Also, is there a cleaner way to force ie to bring
up the new page in a new IE besides modifying
the DOM (by putting in lnk.target = "_blank")?
What I'm getting at by this is a possible snythetic
click.
Thanks for any ideas,
Csaba Gabor from Vienna
PS. I know that I can explicitly create an IE and then
tell it to Navigate2 to site implied by the lnk.href,
but I'd rather have IE do the work for me.
Set ie=CreateObject("InternetExplorer.Application")
ie.visible=true
ie.Navigate2 ("about:blank")
While ie.ReadyState<4: WScript.Sleep 200: Wend
demoPage = _
"<a id=mylink href='http://google.com'>foo</a>"
ie.document.body.innerHTML = demoPage
Set lnk = ie.document.getElementById("mylink")
lnk.target = "_blank"
lnk.click