Make a HTML page visible in a Interactive View / Component?

Hi

Is there a way to make a html page (link stored in a column in a KNIME table) (e.g. https://forum.knime.com/t/accepted-solutions/41359) visible in an Interactive View /Component . It’s not a problem if the links on the page don’t work.
gr. Hans

Hi @HansS

Maybe the following is a solution to your question on how to integrate a web page into an -Interactive View- node:

It is achieved through an iframe in JavaScript as follows:

var body = document.getElementsByTagName('body')[0];
var html = '<h1>Make a HTML page visible in a Interactive View / Component?</h1>';
    html += '<iframe src="https://www.knime.com" id="serverurl" width="800" height="600"></iframe>';
body.innerHTML = html;

To make it dynamic, you would just need to replace the static https address by a KNIME variable or cell value from your input data table.

Hope this helps.

Best
Ael

3 Likes

Hi @aworker , Ael

Tnx, It works for www.knime.com (and some other websites) but not for (the sub-pages of) forum.knime.com (and a lot of other websites).
It looks like it has something to do with that some (most) websites add x-frame-options headers (deny or sameorigin) to ensure that their content is not embedded into other sites.
Or maybe I’m overlooking something else?
gr. Hans

1 Like

Hi @HansS

You are right and the problem is as stated in the link you mentioned.

I’m off work now answering from my mobile phone. I will provide a complementary answer tomorrow whem I’m back to work.

Maybe in the meanwhile somebody else can provide further explanation and a solution to bypass the limitation.

Best
Ael

1 Like

Hi, I have a similar topic. In fact I want to see several things via a KNIME application accessed via our webportal. I used the technique above an see the knime web page, I also see a sharepoint site of our internal sharepoint. But I do not see:

  • a SAC story
  • a document or library within our sharepoint
  • a wiki page within our internal sharepoint wiki

any suggestion what to consider? Still waiting for the promised answer from @aworker

thanks
br
D

Hi @d00m

@HansS’s reply is pointing out the reason why an iframe cannot be used to embed other web sites or pages in some cases :

1 Like

Thanks all,
well I understand that as: My aim is possible, I just need to make sure our webpages are allowing that.
br
D

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.