Welcome Guest Search | Active Topics | Sign In | Register

EO.WebBrowser crashes when F5 pressed Options
Clarence
Posted: Thursday, October 2, 2025 9:45:22 PM
Rank: Member
Groups: Member

Joined: 9/29/2019
Posts: 14
Using the browser event OnLoadDone()
{
WebWin=EOWeb.GetDOMWindow();
WebDoc=WebWin.docouement; ParsePg();
}

void ParsePg()
{
...
EO.WebBrowser.DOM.Element e = WebDoc.getElementById("someID");
...
}

The above line crashes when F5 is pressed with error
EO.WebBrowser.JSInvokeException: 'Invoking function 'getElementById' failed because object is invalid.'

How can prevent or what should be check when parsing the page?
eo_support
Posted: Friday, October 24, 2025 12:12:18 PM
Rank: Administration
Groups: Administration

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

Sorry about the delay. Somehow we missed this post.

The error message indicates that the document object no longer exists. This can happen if your page immediately redirect to a different page after it has finished loading. If this is not the case, please try to isolate the problem into a test project and send the test project to us. Once we have that we will investigate further. See here for more information about sending test project to us:

https://www.essentialobjects.com/forum/test_project.aspx

Also how did you connect F5 to your OnLoadDone event handler? I understand that F5 triggers a refresh, but it does not directly trigger any of EO.WebBrowser's event.

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.