iFrame and web pages on HTML5

Is it possible to open an external HTML5 page or add an iframe on a HTML5 display?

1 Like

You can include the Hyperlink dynamic action to any object. It is the easier way, or you can use the code behind.

The code behind of HTML5 pages is a JavaScript code, you can use JavaScript to open another url too.

1 Like

Thank you. I mean to open an external page inside the display, like opening a web page inside the display on a frame.

Hi @mario. Welcome to the Tatsoft community!
Yes you can do that for both .NET and HTML5 type project pages.
1st - create a new page in Draw, and select .NET or HTML5 (in your case (HTML5))
2nd - Near the bottom of the tools list on the left of the draw area there is a tool whose tooltip says “create a web browser window”. Just drop that onto the page for whatever size and location you want like any other box or object.
3rd - In the left properties pane you’ll see where you can assign the URL to that window for it’s start page.

image

Give that a try and let us know if you have any further questions!
Thanks!

1 Like

Just to clarify, FactoryStudio is smart enough to enable only objects available to each kind of page. Then, drawing objects supported in .Net will appears only in the .Net page and objects for HTML5 appears only in HTML5 pages.

The FS WebBrowser object is available only to .Net pages. So to use a WebBrowser control in HTML5 pages you need to use an external HTML5 control.

Another solution, is use the iframe from HTML Documents in the JaviScript CodeBehind, as in the example code below:

this.OnInitializeControl = function(control)
{
debugger;

if (control.Uid == "iFrame1")
{
	var ifrm = document.createElement("iframe");
    ifrm.setAttribute("src", "http://localhost:3103/Data Access API.pdf");
    ifrm.style.width = "640px";
    ifrm.style.height = "480px";
    control.appendChild(ifrm);
return true;

}

Also, it is important to know about the code above that only allowed Servers will have permission to show the web page inside of the FS displays. The FS project server is always allowed. Others servers depend the browser security configuration.

1 Like