Adding javascript just before closing body tag

Here should go questions about transforming XML with XSLT and FOP.
kmank
Posts: 118
Joined: Mon Apr 19, 2010 5:33 pm

Adding javascript just before closing body tag

Post by kmank »

Hi,
Using O17.1, I'm trying to add a script just before the closing body tag of all webhelp topics. Searching the forum, I cannot locate the file in which to place the code.
Any help is greatly appreciated!
bogdan_cercelaru
Posts: 222
Joined: Tue Jul 01, 2014 11:48 am

Re: Adding javascript just before closing body tag

Post by bogdan_cercelaru »

Hello,

I've logged your request on our issue tracking tool to be analyzed.
Until it is implemented you can use the webhelp.footer.file parameter as a workaround.
The content of the file referred by this parameter should look like:

Code: Select all


<script type="text/javascript">
/* Your code goes here */
</script>


Regards,
Bogdan
Bogdan Cercelaru
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
kmank
Posts: 118
Joined: Mon Apr 19, 2010 5:33 pm

Re: Adding javascript just before closing body tag

Post by kmank »

thank you Bogdan - this certainly could be a resolution. However, this morning I located where it needed to be:

dita2webhelp.xsl needed to be modified in <xsl:template match="/|node()|@*" mode="gen-user-footer"> .
Simply placing the javascript code before </xsl:template> allowed the script to appear immediately before the output </body> tag.

This allows for the end result without needing to deliver another file to the authors.

Thanks again for your direction.
Post Reply