Welcome Guest Search | Active Topics | Sign In | Register

EO.WebBrowser last version issues and StatusCode Options
Fractus
Posted: Thursday, February 20, 2014 9:11:31 AM

Rank: Member
Groups: Member

Joined: 9/3/2013
Posts: 16
Hello,

We are testing EO.WebBrowser and is a great component. But we detect some issues, maybe you could help us or maybe it's a fix that you need to code.

- Last version (2013.0.72) Im adding a WebBrowser to a WinForm. When I set the "Dock" Property to "Fill" it fills the winforms leaving a 1px or 2px border. If I change the DLL to the previous version, it fill the winform properly.

- When I navigate to a new URL, how can I detect the "StatusCode" when the URL loads?


Fractus - Developer & Consulting
eo_support
Posted: Thursday, February 20, 2014 9:20:03 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,071
Hi,

Thanks for letting us know. We are not aware of the border issues. We will look into it and let you know.

The HTTP status code is available through this propery:

http://www.essentialobjects.com/doc/6/eo.webbrowser.navigationtask.httpstatuscode.aspx

For example, you can do:

Code: C#
//Load the Url
NavigationTask task = WebView1.LoadUrl("http://www.google.com");

//Wait for the load to finish
task.WaitOne();

//Now you can get the status code
int statusCode = task.HttpStatusCode;


Instead of calling WaitOne(), you can also handle the WebView's LoadComplete. The event argument of that event also provides the NavigationTask object that has just finished loading.

Hope this helps.

Thanks!
Fractus
Posted: Thursday, February 20, 2014 9:49:42 AM

Rank: Member
Groups: Member

Joined: 9/3/2013
Posts: 16
Thanks for the help, I'll be waiting for the update of the dock property.

Fractus - Developer & Consulting
eo_support
Posted: Monday, February 24, 2014 9:29:01 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,071
Hi,

We have posted a new build. Please try that build instead. We have not been able to reproduce the docking issue both in the old build and new build though. If you continue to have problem with the new build, please post a picture (you will have to post the picture somewhere else and provide a link) so that we can see the problem.

Thanks!
Fractus
Posted: Wednesday, February 26, 2014 7:46:33 AM

Rank: Member
Groups: Member

Joined: 9/3/2013
Posts: 16
Hello,

I'm attaching a screenshot and a demo project replicating the issue of the border. Hope this helps.

Screenshot
Project

Fractus - Developer & Consulting
eo_support
Posted: Thursday, February 27, 2014 12:00:23 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,071
Thanks for the test project. We have confirmed this to be an issue. We will fix this in our next build.
eo_support
Posted: Thursday, February 27, 2014 10:11:28 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,071
Hi,

We have posted a new build that should fix this issue. You can download the new build from our download page.

Thanks!
Fractus
Posted: Friday, February 28, 2014 1:17:37 PM

Rank: Member
Groups: Member

Joined: 9/3/2013
Posts: 16
Hello,

It's working perfectly, thanks guys.

Another question...

We are using the event "LoadComplete", it's fires the event after the page loads. But when we click on a href on the page, the "LoadComplete" event doesn't fire again. What we are doing wrong? or how can we achieve this?

Best Regards!

PD: We will acquire this component, it's really good.

Fractus - Developer & Consulting
eo_support
Posted: Friday, February 28, 2014 1:49:27 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,071
Hi,

Glad to hear that it's working for you and you will acquire the component!

The LoadComplete event is only used to track one of the LoadXXX calls issued by you. For example, when you call LoadUrl, you will get a NavigationTask object. You have two options to detect when this NavigationTask object finishes load. One way is to call NavigationTask.WaitOne to wait. Another option is to handle LoadComplete event. The event argument of the LoadComplete event will pass you the same NavigationTask object associated to the original LoadUrl call. Because a unique NavigationTask object is associated to each LoadXXX call, LoadComplete event (and LoadFailed event) is very accurate. For example, if you issue LoadUrl a load Url call to load a page, but that page contains JavaScript code to redirect to another page (assume the JavaScript code is included directly in the page so the code runs before the page finishes loading), then when the redirect happens, a LoadFailed event will be fired. In this case you can know for sure that the page loaded is not the original page your code requested since a LoadFailed, not LoadComplete event is fired for your NavigationTask object.

When you click on href on a page, the load was not initiated by you so no NavigationTask object was created to track the the progress. As such no LoadComplete/LoadFailed will be fired. In this case you can use IsLoading and IsLoadingChanged event to monitor whether the WebView is still loading the page. The disadvantage of IsLoading/IsLoadingChanged is that it can't be used to precisely distinguish which page has been loaded. For the same example above, you will see IsLoading changed to false after the redirected page is loaded. However there is no way for you to tell that the WebView has actually loaded a different page just by IsLoading alone. This is when LoadComplete/LoadFailed event is useful.

When user clicks a href, BeforeNavigation event will be fired. We are thinking about providing a way to associate a NavigationTask event to the new request inside this event handler. Once that is implemented, you will have the option to track such load request too.

Thanks!
Apex Networks Ltd.
Posted: Wednesday, May 20, 2015 7:58:01 AM

Rank: Advanced Member
Groups: Member

Joined: 5/8/2015
Posts: 46
Hi,

How would we go about capturing and dealing with a failed navigation when that navigation was triggered by a user (i.e. clicking from one page on a site to another that doesn't exist) as this won't fire a LoadFailed or LoadComplete event?

I've looked at the IsLoadingChanged and this fires when user-initiated navigation fails but there's nothing I can see to differentiate failure from success?

Regards,
Andy.
eo_support
Posted: Wednesday, May 20, 2015 9:01:42 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,071
Hi,

There is no way to do that in the current build. We have a new build that is currently going through test will fire LoadCompleted/LoadFailed events for all navigations, including both those initiated by your code and those initiated from the user. That build will be out very soon.

Thanks!
Oscar
Posted: Tuesday, October 6, 2015 11:54:51 AM
Rank: Newbie
Groups: Member

Joined: 10/6/2015
Posts: 1
Hi,

Do you have any news about this feature?

Regards,
Oscar.
eo_support
Posted: Tuesday, October 6, 2015 12:42:50 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,071
Oscar wrote:
Hi,

Do you have any news about this feature?

Regards,
Oscar.


Hi,

This is already implemented in the current build.

Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.