Skip to Content

How to display an external website in SAPUI5 application?

Jan 31, 2017 at 11:56 AM


avatar image

I am trying to display an external website in my SAPUI5 application using the element sap.ui.core.HTML.

The website I am trying to display has its X-Frame Options set to deny. So I am unable to display it inside iframe like HTML tags. Is there a workaround for this? Or is there any other alternative to using sap.ui.core.HTML? I tried the following solutions which have not worked for me as of now:

I tried loading the website using AJAX method. But the website loads without style or script. I applied "dataType: jsonp" to this but this does not work in my case.

Also I tried to create a local html page for the website but it break out of the iframe to open in a new window.

Anchor tag (HTML) on my page always tries to open the website in a new window regardless of the target value. Same is the case with sap.m.Link

I tried accessing using but this way it throws a "Uncaught SyntaxError: Unexpected token <" error.

Please help.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

0 Answers