We are trying to insert Javascript into a topic file in the text editor (and we've tried using the Insert Script option in the XML editor with the same results). Each time we generate the help target (HTML5), the javascript is commented out? Any ideas? This is the script after it is generated:
<script type="text/javascript">/*<![CDATA[*/writeVideo('/swf/Matter Setup_Coding Panels.mp4');/*]]>*/</script>
Javascript stripped during target generation
Re: Javascript stripped during target generation
By no means am I a java script guru. In my case - HTML 5 output - the condition you're reporting does not happen. Meaning the javascript code is viewable in the source and output. Are you placing the script inside the body tag?
-
jimstrider
- Jr. Propeller Head
- Posts: 5
- Joined: Thu May 12, 2016 3:52 pm
Re: Javascript stripped during target generation
Flare inserts the CDATA and associated characters. You would need to speak with technical support about why they do that.mrmansfan wrote:We are trying to insert Javascript into a topic file in the text editor (and we've tried using the Insert Script option in the XML editor with the same results). Each time we generate the help target (HTML5), the javascript is commented out? Any ideas? This is the script after it is generated:
<script type="text/javascript">/*<![CDATA[*/writeVideo('/swf/Matter Setup_Coding Panels.mp4');/*]]>*/</script>
The characters inserted by Flare do not comment out your JavaScript. Notice that there are two sections -
/*<![CDATA[*/
and
/*]]>*/
Each inserted section is commented out. Your JavaScript is not. If you remove the commented sections, you see -
<script type="text/javascript">writeVideo('/swf/Matter Setup_Coding Panels.mp4');</script>
If that does not work as you expected, it is not because of the characters added by Flare. FWIW, my Flare projects use JavaScript and JQuery fairly extensively.