sindbad
asked on
Internet Explorer object in VB
Hi,
I'm using Internet Explorer object in a VB app. A URL is passed to the IE object and navigate method is invoked. Now, if for some reason (wrong page, wrong asp, web server is down) the browser object can't load the URL and display the error page, how this can be identifed and checked programmatically ?.
Thanks
Sindbad
I'm using Internet Explorer object in a VB app. A URL is passed to the IE object and navigate method is invoked. Now, if for some reason (wrong page, wrong asp, web server is down) the browser object can't load the URL and display the error page, how this can be identifed and checked programmatically ?.
Thanks
Sindbad
i'm late... again ;)
ASKER
Hi,
Sorry for responding immediately.
I tried your way. But, in each scenario(wrong page, server down, network down) , I get a differnt test in browser.document.title. Is there a way to handle this ?
What's about to store list of possible titles with errors and perform predefined operation for each title?
Cheers
Cheers
ASKER
Is there a way to find the status of the .htm/.asp loaded in the browser object (directly in the browser object) than comparing the text in the title of the document representing the loaded page ?.
ASKER
I'm closing this thread as I don't get a satisfactory
reply.
ASKER
I'm closing this thread as I didn't get a satisfactory reply.
Don't close it!, post a new 0 points question regarding this one.
Maybe trying this:
Private Sub WebBrowser1_DownloadComple te()
On Error GoTo errTrap
If (pDisp Is WebBrowser1.object) Then
Me.Caption = WebBrowser1.document.fileS ize
End If
Exit Sub
errTrap:
If Err.Number = -2147467259 Then _
Me.Caption = "An error ocurred while trying to access that Url."
End Sub
Private Sub WebBrowser1_DownloadComple
On Error GoTo errTrap
If (pDisp Is WebBrowser1.object) Then
Me.Caption = WebBrowser1.document.fileS
End If
Exit Sub
errTrap:
If Err.Number = -2147467259 Then _
Me.Caption = "An error ocurred while trying to access that Url."
End Sub
Hi sindbad,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will ask a Community Support Moderator to:
Refund points and save as a 0-pt PAQ.
sindbad, Please DO NOT accept this comment as an answer.
EXPERTS: Post a comment if you are certain that an expert deserves credit. Explain why.
==========
DanRollins -- EE database cleanup volunteer
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will ask a Community Support Moderator to:
Refund points and save as a 0-pt PAQ.
sindbad, Please DO NOT accept this comment as an answer.
EXPERTS: Post a comment if you are certain that an expert deserves credit. Explain why.
==========
DanRollins -- EE database cleanup volunteer
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
If UCase(Left(WebBrowser1.Doc
End Sub
Cheers