Issues with executing JavaScript functions from HTML rendered by XSLT



I'm still relatively new to XSLT and I have a problem I hope someone can help with. I'm rendering an HTML page using XSLT. I found out how to include an external .js file in the XSL file:



<script type="text/javascript" src="scripts.js"><xsl:comment>X</xsl:comment></script>


This properly rendered the script tag in the HTML:



<html xmlns="http://ift.tt/lH0Osb">
<head>
<title></title>
<link href="main.css" type="text/css" rel="stylesheet"/>
<script type="text/javascript" src="scripts.js"><!-- comment --></script>


However none of the functions in the JavaScript file are accessible. The jQuery $(document).ready event isn't being executed either when the HTML is rendered. How can I get the rendered HTML to actually execute the JavaScript?


Any ideas?


If I should provide any additional information please let me know.


No comments:

Post a Comment