Hi I have included an html page into an adf jsff page using the tag <jsp:include>
<f:facet name="parenContent">
<jsp:include page="www/included.html"></jsp:include>
</f:facet>
The page is rendered successfully, but the javascripts inside the included page is executed only on the refresh of the whole page (by manually refreshing).
included.html
<html>
<head>
<link rel="stylesheet" type="text/css" href="grapheditor.css">
</head>
<body class="geEditor">
<script>console.log('loading page');</script>
<h1>Hello</h1>
<script>console.log("check");</script>
</body>
</html>
When refreshed the page the script tag is executed. The same is the case with javascript included using
<script type="text/javascript" src="javascript.js"></script>
I have tried placing the script tag in both <head>
and <body>
I need to execute the js when the first time the page is loaded without a refresh. How is it possible?
Update
I tried giving a non existing path to the src in <script>
<script type="text/javascript" src="thisFileDoesNotExists.js"></script>
On the first load it is not even trying to load this file. On page refresh it is giving 404 error for this file.