Hi All,
I am trying to add the HTML file in outsystems but however I don't get the actual result.
I also followed this post Use Static HTML page | OutSystems but it does not direct to the actual URL. Please assist on the same.
Hello @Akshata Tallur ,
I tested the method from your post, and it worked correctly. Could you share what URL you’re being redirected to and why it’s incorrect?
Alternatively, you could try creating a new screen and injecting that HTML there. This discussion might help: How to insert HTML code inside a DIV
Hi @Mihai Melencu
I have attached the HTML file please check and assist on the same.
I think there might be an issue with the file itself, the link looks fine and redirects to the correct resource. Could you share the HTML code from the file or the HTML file itself?
Also, I’d recommend removing the link from your post since it’s company-related.
I tested your file in my personal environment and it works correctly. However, it doesn’t work in the company environment, which suggests that the issue is related to the Content Security Policy (CSP) or other security restrictions in place there.
I recommend reaching out to your company’s CoC team. I’ve sent you their contact address privately so you can explain the situation to them directly.
Adding and displaying an HTML file in OutSystems can be achieved through multiple approaches, depending on your exact use case. Below are some methods and troubleshooting suggestions for both embedding HTML and using the RedirectToURL method:
If your goal is to embed the content of an external HTML file and display it within an OutSystems page, here are some common methods:
SourceURL
Escape Content
<html>
<head>
<body>
For instance, through screen preparation, you can fetch the HTML content as a text string (e.g., via an API) and bind it to the expression widget. Note: Remove top-level <html> and <body> tags from the content since embedding a nested <html> document isn't valid HTML structure Not able to open complete HTML content as a page.
If you want the user to navigate to your HTML file via the link's RedirectToURL method (as shown in ), but it's not working as expected, here are some things you can check:
RedirectToURL
URL
Resources.index_html.URL
Resource
.html
Resources.<FileName>.URL
<None>
Nested HTML Error:
Cross-Origin Restrictions:
iframe
Alternative Approach: Download HTML:
FileDownload
For embedding dynamic HTML, the best method is using the HTML Widget with Escape Content: No. For full HTML redirection, ensure the URL points to an accessible resource or external link, and validate configurational details for resources. Let me know if you face specific challenges!
Escape Content: No