Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Controls
  New Posts New Posts RSS Feed - [SOLVED!] Web Browser Control Navigate error.
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

[SOLVED!] Web Browser Control Navigate error.

 Post Reply Post Reply
Author
Message
shipwreck View Drop Down
Senior Member
Senior Member
Avatar

Joined: 18 April 2008
Location: United States
Status: Offline
Points: 308
Post Options Post Options   Thanks (0) Thanks(0)   Quote shipwreck Quote  Post ReplyReply Direct Link To This Post Topic: [SOLVED!] Web Browser Control Navigate error.
    Posted: 22 January 2010 at 12:48pm
[SOLVED: VIEW POSTS BELOW FOR SOLUTION.]
Hello everyone.
I would like to have custom error pages within my browser that would be displayed depending on the error that happens.
I'm pretty familiar with error codes such as 404 and so on but I don't really know how to implement these into the control. I'm assuming it is under the navigate error even but Not sure what code or API that would need to be added here.

Anyone help out a bit? I'd really appreciate it!

Thanks & Regards in advance!
Product: Xtreme Suite Pro (Active-X), Version 15.3.1

Platform: Windows 7 Ultimate SP1 (64Bit) & Windows XP Mode SP3 (32Bit)

Language: Visual Basic 6.0 SP6
Back to Top
shipwreck View Drop Down
Senior Member
Senior Member
Avatar

Joined: 18 April 2008
Location: United States
Status: Offline
Points: 308
Post Options Post Options   Thanks (0) Thanks(0)   Quote shipwreck Quote  Post ReplyReply Direct Link To This Post Posted: 22 January 2010 at 5:58pm
Well, wouldn't you know that I was able to solve this one on my own as well. I guess we really do learn something new every day.

I will post another post below this one explaining the code I used to solve the problem just in case any of you all happen to run into any trouble too!
Product: Xtreme Suite Pro (Active-X), Version 15.3.1

Platform: Windows 7 Ultimate SP1 (64Bit) & Windows XP Mode SP3 (32Bit)

Language: Visual Basic 6.0 SP6
Back to Top
shipwreck View Drop Down
Senior Member
Senior Member
Avatar

Joined: 18 April 2008
Location: United States
Status: Offline
Points: 308
Post Options Post Options   Thanks (0) Thanks(0)   Quote shipwreck Quote  Post ReplyReply Direct Link To This Post Posted: 22 January 2010 at 6:04pm
Okay, I'll try to explain this the best that I can:

What you'll need:
• One Web Browser control (I named mine "WB").
• One CJ PushButton (This isn't really required.)

in the click event of the button place this code.

Private Sub btnWB_Click()
WB.Navigate ("http://www.google.co.in/test.htm")
' This is a bogus link. It's used to display an error.
End Sub

Next, under the WB's navigate error event, add:

Private Sub WB_NavigateError(ByVal pDisp As Object, URL As Variant, TargetFrameName As Variant, StatusCode As Variant, Cancel As Boolean)
If StatusCode = 404 Then MsgBox "Server not found."
End Sub

Hope this helps everyone as much as it has me.
Product: Xtreme Suite Pro (Active-X), Version 15.3.1

Platform: Windows 7 Ultimate SP1 (64Bit) & Windows XP Mode SP3 (32Bit)

Language: Visual Basic 6.0 SP6
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.266 seconds.