Remove script tags from html of web screen

Remove script tags from html of web screen


I need to create a simple html page. I created a webscreen with the required info. I was able to call that webscreen and retrieve the generated html.
This works fine apart from the fact that the page contains some scripting tags that I don't want.

<script src="_osjs.js?6_0_1_15" type="text/javascript" charset="UTF-8"></script>

<script type="text/javascript">
var OsPage_ValidationActive = false;

function OsValidatorOnSubmit() {
  if (OsPage_ValidationActive) { return OsValidatorCommonOnSubmit(); }
  return true;
// ]]>

How can I prevent these tags from being added to my web screen?

Hi Kurt.

The osjs file contains the Platform generated Javascript code used, for instance, in the AJAX behaviours, amongst other things like input validations, etc.

I don't know if it's possible to remove it from the webscreens generated code but it doesn't seem recommendable at all to me.

In this case, I need a pure .html file that can be opened on any browser without needing a connection to any server or database. So I don't need it, it only gives error because from the pcs it's opened, the js file is not known.

A solution would be to do a string replace, but I was hopening that there would be a more elegant way.

I don't recommend using the procedure on that topic.
That "feature" was made for a very particular scenario and most pages generated with the platform may not work with that setting active.

If what you really need a simple html page you can write the html manually (as text) and output it using a download node on the preparation.
You lose the WebScreen capabilities of the platform using it like that, but at least it won't be broken from one version to the next. String replaces are also a very bad idea, pages output can change even between platform revisions.

Note: Settings like those are not meant "public" use, they have restrictions on usage (as explained to the customers they are given to) and most of the time they are treated as not supported.

João Rosado