AnsweredAssumed Answered

Can not add script inside a webcontent of html type

Question asked by on Apr 18, 2013
Latest reply on Apr 19, 2013 by afaust
We are trying to add a html content in a web content.
Whenever we add java script inside that the script tag is getting commented.
The content is as shown below. After creating the content yo can see that the commented script tag.
How to add java script inside this HTML content ?.
<script type="text/javascript"><!–
// –></script>

<script type="text/javascript"><!–
function switchContent(obj) {
obj = (!obj) ? 'sub1' : obj;
var contentDivs = document.getElementById('container').getElementsByTagName('div');
for (i=0; i<contentDivs.length; i++) {
if ( &&'sub') != -1) { contentDivs.className = 'hide'; }
document.getElementById(obj).className = '';
// –></script>
<div id="sub1">
<div id="estext"><a class="translink es" onclick="switchContent('sub2'); return false;" href="#">Español</a></div>
<h1 class="sctitle">Frequently Asked Questions</h1>