HTMLViewer problems on web edition

im tring to use htmlviever on web edition, i have tried on 2023r4 and 2024r1 but the resul is the same

thi is the code

this is the result, any suggestions ?


There are websites that won’t allow you to embed them inside your website. Google definitely doesn’t.

For example, this code will work just fine:


It is up to the owner of the website to allow or prevent this behavior.

ok with the first page is loaded the if you click on link more information the problem is the same of

then i have tried with and the problem is the same

It’s not an issue with Xojo. The site has a content security policy that blocks loading in <iframe>. There’s really nothing Xojo or you can do. If you control the server you wish to load a URL from, you can change those settings, but you can’t override the security of a third-party site. Typically, instead of loading such sites in an <iframe> or HTMLViewer, as we know it, the target page is launched in a new browser window/tab using the target="_blank" attribute of a link element.

ok in that case the HTLMviewer control is absolutely useless

For some sites, yes. This is, as I said, a security measure meant to protect people from being tricked in to providing their information – such as credit cards and login credentials – to a site that isn’t the intended recipient. For many other uses, the HTMLViewer is still very much useful.

1 Like

Firfox gives good information about the why:

The HTMLViewer can’t break the security settings for a site, it is the same as if you have an .html file in your computer/server and you try to open an iframe to that site (as mentioned above), try this:

<div style="left: 40px; top: 20px; width: 532px; height: 300px; position: absolute;">
<iframe src="" style="width: 100%; height: 100%;"></iframe>

you will get the exact same result.

1 Like

Ok, open onother Page Is not same of display the result on same Page but

If i open the destination in another Page, when i intheract with htmlviewer in source Page (with metoh likes execjavascript or other) the result Is propagate on new open Pages ?