I am using a script that fires in the onload event.
template.html
This html file uses headers, footers, and some iframes.
<script>
function callbeforeload()
{
if(condition)
{
}
else
{
window.location("exception.jsp");
}
}
</script>
<body onload="callbeforeload();">
If I use window.location, it redirects to another jsp page. My question is: template.html should not load the whole page. You need to check this script first, and then move on to another function. Now it loads the whole page (usually an iframe in my case), and then comes to this script. Is there an alternative way to achieve this?
user3152748
source
share