Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Web page popup - DocumentFactory.createDocumentF

Status
Not open for further replies.

kmomberg

MIS
Jul 19, 2002
18
0
0
US
I have a partial program to spider a web site. Recently I noticed when I hit certain web pages, I am presented with a popup dialog box:

Internet Explorer
This page has an unspecified potential security risk.
Would you like to continue?
Yes No

I did some googling and found this goes way back to IE6 with MS patch 06-045 (KB921398). I am on IE8 WXP SP3. This specific patch did not appear in Add/Remove so I am unable to specifically remove this patch. The code snipet looks like this:

Set GetWebPage = DocumentFactory.createDocumentFromUrl(strUrl, "")
Do While tmr + GWebPageTimeout > Timer
If GetWebPage.readyState = "complete" Then
Exit Do
End If
DoEvents
Loop

When the popup appeared while stepping through the code, I noticed the readyState is "Interactive" instead of the expected "complete". I was going to try to get around this programatically by checking whether this window opens up with the specific window title but the debugger stops processing source code lines until I hit the Yes or No to the dialog box. Ideas? Workarounds? Snipets?
 
I can't say for sure but sometimes if you set the .Silent property to True it helps with these problems. For some reason you have to set it via code, if you set it at Design Time it reverts back to False.

- Andy
___________________________________________________________________
If you think nobody cares you're alive, try missing a couple of mortgage payments
 
Is this a global setting or is it specific to the DocumentFactory.createDocumentFromUrl snipet I found to do what I want? Do you have an example? From what I found from google hits, this is a bug in the MS bug fix itself. I found a reference to the problem w/o the details only saying any resource external to the PC (internet and remote drive mappings) are essentially treated as local resources in the same security zone. This essentially bypasses the warning flag when using a resource on another system.
 
Oops yes sorry, I recently wrote a web crawler using the WebBrowser control as a backbone and I read between the lines of your post and assumed you were doing something similar, which you aren't, so my comment is pointless.

- Andy
___________________________________________________________________
If you think nobody cares you're alive, try missing a couple of mortgage payments
 
I found a solution. If I compile the program timer events still run at the specified intervals. Now I just have a timer to check for the popup of the new window every few seconds. If it finds the window, it issues a SendMessageto close it. Works great.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top