How to know when Browser widget has finish loading a page?

This thread was migrated from an old forum. It may contain information that are no longer valid. For further assistance, please post a new question or open a support ticket from the Customer Support portal.

Dear Team,

on my app I have a "generic" form named frmBorwser with a browser widget that I use everytime I need a browser widget.

When I load the form for the first time I see a white background with a loading sign - No problem.

When I need to re-open the frmBrowser I always see the last webpage opened - but I don't want that.

I would like to add a flexContainer in White in the front of the widget, and set visibility to true when calling the form, then false after the page has loaded. How do I know when the page has finish loading?

I know that I can kill the form everytime I leave the form and reopen when needed.

Regards

Not sure this is best way to do that.

1) I start the form:

function show(url){
try{
	frmBrowser.flxFilter.isVisible = true;
	frmBrowser.brwMain.baseURL = url;
	frmBrowser.brwMain.requestURLConfig = {"URL" : url, "requestMethod":constants.BROWSER_REQUEST_METHOD_GET};
	frmBrowser.show();
}catch(e){
  	alert("Error: "+e);
}

}

2) Bindevents:

function onPageFinishedCallback(eventobject, params) {
frmBrowser.flxFilter.isVisible = false;
}

function bindEvents() {

frmBrowser.brwMain.onPageFinished = onPageFinishedCallback;

}

What do you think?

@Svwvh Wvtson​ : This method will work. Why not use "htmlString" property while loading the form with an empty body and clear the browser while loading the form?

@SRINAG BODA​ ! Nice to hear form you!

I wanted to show a small animation when loading. The result is in the video 😀

:D Looks good @Svwvh Wvtson​ 👍