I’ve created an XSL stylesheet that has some embedded JavaScript. It calls functions that in turn call document.write() to print the results of these functions to the page.
<xsl:foreach...>
<div class="directionBlock">
<script type="text/javascript">writeDirection('<xsl:value-of select="Direction"/>');</script>
</div>
</xsl:foreach...>
Unfortunately, in firefox, document.write() is not supported. What to do?
The way I implemented a solution is to call a function and pass the row number:
This in turn used JQuery to access the element in question, using nth-child(position) to get the row, find a selector and use .html() to insert code into that element.
Thanks for all your help!