I need to append the following code via innerHTML to a HTML textfield.
<script type="text⁄javascript"><!--
my_client = "test/test2/456789";
my_num = "gjhklasd";
my_width = 728;
my_height = 90;
my_page_url = "${SOMEURL}";
//-->
</script>
Is there an alternative to escaping above code for JavaScript other than making it look like?
<script type="text⁄javascript"><! etc.
I'm asking because escaping the snippet with above entities results in "ghost script" to be inserted e.g. <!-- appears all of the sudden at places where I didn't put it.
As aside this might be a Browser Bug I discovered. Reproducable on Firefox 9 for Windows and Opera 11 for Linux.