I have a link, that when I click it calls a javascript function with a string argument. This string is actually an a-tag+script-tag, like:
<a>..</a><script>...</scipt>
which displays a video file.
So anyways, the javascript function is supposed to create that code, and make the video show on the page, but what shows up when I press the link is a string of the code, so its showing as text (but part of it is a hyperlink) and not executing to become the video.
Anyone know why?
Its weird, because if I copy the code (which displays as text), and paste it in the editor like normal, then the video shows...
<a title="Click to Show Video" href='javascript:void(0);' onclick="switchFunc('{$thisNode/@*[name()=current()/@Name]}');">
<div dir="{@Direction}" class="ms-rtestate-field">
<xsl:value-of select="$thisNode/@*[name()=current()/@Name]" disable-output-escaping="yes"/>
</div>
</a>
<script type="text/javascript">
function switchFunc(source) {
document.getElementById('videoContainer').innerHTML = source;
}
</script>
<div id="videoContainer"> </div>