Skip to main content
Is there a widget for that I can use to embed a web browser page directly inside a Legauite webpage? Maybe a iFrame? Please let me know, thanks.

------------------------------
Peter Cheng
Software Engineer
Amber Road Inc
Parsippany NJ US
------------------------------
Is there a widget for that I can use to embed a web browser page directly inside a Legauite webpage? Maybe a iFrame? Please let me know, thanks.

------------------------------
Peter Cheng
Software Engineer
Amber Road Inc
Parsippany NJ US
------------------------------
Hi Peter,

I think you can use the scriptwindow widget to create an iFrame and append that to current (scriptwindow) element in the DOM tree. I will try to find an example tomorrow. 

Thanks,
jeroen

------------------------------
Jeroen Van Dun
Product Manager
Rocket Internal - All Brands
Waltham MA US
------------------------------
Is there a widget for that I can use to embed a web browser page directly inside a Legauite webpage? Maybe a iFrame? Please let me know, thanks.

------------------------------
Peter Cheng
Software Engineer
Amber Road Inc
Parsippany NJ US
------------------------------
Hi Peter,

You can load an iframe to a widget of type scriptwindow on the page.

To do so, add a scriptwindow to your web page, open the script editor, and apply for instance this example in there.
Obviously you can change the URL to another URL for including other pages than this YouTube example.

//*******************************************************************************/
//*  Rocket Software makes no warranty, express or implied, with regard to      */
//*  this material, including fitness for use. Additionally, Rocket is not      */
//*  responsible for maintaining compatibility of this information with future  */
//*  releases.  Rocket provides this as an example only.                        */
//*  Customers using this information do so at their own risk.                  */
//*  The items provided to you are identified as Type II material               */
//*  as per the Professional Services Agreement. For the                        */
//*  avoidance of doubt, this means that Rocket owns the IP in                  */
//*  any such deliverables.                                                     */
//*******************************************************************************/

//
// To use the host api uncomment the following lines:
//
var api = this;

// To retrieve the DOM element of this script window uncomment the following line:
//
var element = api.target;

var video_id = "Mssg6SQdCJM";
var autoplay=1;
var autohide=1;

// Make the script window responsive 
element.style.width = "100%";    
element.style.height = "100%";    

// Create an iFrame with autoplay set to true
var iframe = document.createElement("iframe");
iframe.setAttribute("src", "https://www.youtube.com/embed/" + video_id + "?autoplay="+autoplay+"&autohide="+autohide+"&border=0&wmode=opaque&enablejsapi=1");

// Set the size
iframe.style.top = 0;    
iframe.style.left = 0;    
iframe.style.width = "100%";    
iframe.style.height = "100%";    

// Add it to the script window
element.appendChild(iframe, element);
​


Regards,
Roger.

------------------------------
Roger Van Valen
Rocket Internal - All Brands
Dordrecht, The Netherlands
------------------------------
Hi Peter,

I think you can use the scriptwindow widget to create an iFrame and append that to current (scriptwindow) element in the DOM tree. I will try to find an example tomorrow. 

Thanks,
jeroen

------------------------------
Jeroen Van Dun
Product Manager
Rocket Internal - All Brands
Waltham MA US
------------------------------

This is what I use, we have a page, "WebPopup" that contains a scriptwindow with field id "SW_WebPopup".
We populate the global WebPopup with the url of the site to be displayed, then on a button call the WebPopup page.
( Web servers can be configured to not be embedded  in other sites ).

Below is the javascript for the scriptwindow control...

var api = this;
var hostapi = "hostApi" in api ? api.hostApi : null;
// Global WEBPOPUP is the url to use, populated by regular Seagull Script
hostapi.scriptGlobalGet("WEBPOPUP", function cbGG(url) {
// Select the script window
var myScriptWindow = document.getElementById("SW_WebPopup");
// Create an iframe node
var myiFrame = document.createElement("iframe");
// Set Src,id & style of said iframe
myiFrame.src = decodeURI(url);
myiFrame.id = "itemDescFrame";
myiFrame.style = "height: 100%; width:100%; border: none;";
// Append iFrame to scriptwindow
myScriptWindow.append(myiFrame);
});



------------------------------
Leon Brown
Gui Developer
Vormittag Associates Inc
Ronkonkoma NY US
------------------------------
Hi Peter,

You can load an iframe to a widget of type scriptwindow on the page.

To do so, add a scriptwindow to your web page, open the script editor, and apply for instance this example in there.
Obviously you can change the URL to another URL for including other pages than this YouTube example.

//*******************************************************************************/
//*  Rocket Software makes no warranty, express or implied, with regard to      */
//*  this material, including fitness for use. Additionally, Rocket is not      */
//*  responsible for maintaining compatibility of this information with future  */
//*  releases.  Rocket provides this as an example only.                        */
//*  Customers using this information do so at their own risk.                  */
//*  The items provided to you are identified as Type II material               */
//*  as per the Professional Services Agreement. For the                        */
//*  avoidance of doubt, this means that Rocket owns the IP in                  */
//*  any such deliverables.                                                     */
//*******************************************************************************/

//
// To use the host api uncomment the following lines:
//
var api = this;

// To retrieve the DOM element of this script window uncomment the following line:
//
var element = api.target;

var video_id = "Mssg6SQdCJM";
var autoplay=1;
var autohide=1;

// Make the script window responsive 
element.style.width = "100%";    
element.style.height = "100%";    

// Create an iFrame with autoplay set to true
var iframe = document.createElement("iframe");
iframe.setAttribute("src", "https://www.youtube.com/embed/" + video_id + "?autoplay="+autoplay+"&autohide="+autohide+"&border=0&wmode=opaque&enablejsapi=1");

// Set the size
iframe.style.top = 0;    
iframe.style.left = 0;    
iframe.style.width = "100%";    
iframe.style.height = "100%";    

// Add it to the script window
element.appendChild(iframe, element);
​


Regards,
Roger.

------------------------------
Roger Van Valen
Rocket Internal - All Brands
Dordrecht, The Netherlands
------------------------------
Hi,

Is there anyway to tell the iframe not to render xml formats?

this is my code:

var iframe = document.createElement("iframe");
// RSS Feed
iframe.setAttribute("src", "http://xx.x.xx.xx/printQuote/XMLload/XML_776114_2021-11-18-14.18.11.475000.xml");

I want the iframe to display like this

see attached screenshots


------------------------------
Peter Cheng
Software Engineer
Amber Road Inc
Parsippany NJ US
------------------------------
Hi,

Is there anyway to tell the iframe not to render xml formats?

this is my code:

var iframe = document.createElement("iframe");
// RSS Feed
iframe.setAttribute("src", "http://xx.x.xx.xx/printQuote/XMLload/XML_776114_2021-11-18-14.18.11.475000.xml");

I want the iframe to display like this

see attached screenshots


------------------------------
Peter Cheng
Software Engineer
Amber Road Inc
Parsippany NJ US
------------------------------
Hi Peter,

The iframe will handle the src contents as html source. Even when there is no <html> element found.
Setting the type to "application/xml" will also not prevent this to happen.

On the internet there are various solution to this problem described.
For instance by creating a jsp or asp page that allows you to pass a url to the xml file, or the xml contents in the url itself. This jsp or asp can convert the xml to html for proper display.

Unfortunately I do not have a simple solution for you as this is a browser iframe limitation.

Regards,
Roger.

------------------------------
Roger van Valen
Senior manager, software engineering
Rocket Software
Dordrecht, The Netherlands
------------------------------