Hi,
I'm trying to insert a Struts Tiles attribute into a JavaScript function. The JS function is called on load and certain JSP pages should be allowed to append additional code to that function.
The template looks like this:
<html>
<head>
<script>
function onLoad(){
...
<tiles:insert attribute="html.head.onLoad" ignore="true" />
...
}
</script>
</head>
</html>
And the JSP site that implements this template like this:
<html>
<head>
<script>
<tiles:put type="string" name="html.head.onLoad">
document.getElementById("report").style.height = (getWindowHeight() - 200) + "px";
</tiles:put>
...
</script>
</head>
</html>
Unfortunately, the attribute is inserted not into the JS function, but somewhere outside in the HTML head.
Do you know a way how I can achieve my goal?