K
Kiran Makam
I am setting the content of a div dynamically using innerHTML
property. If the content contains an ampersand, text after the
ampersand is disappearing in IE6. It works properly in Firefox.
This is my code:
----------------
<body>
<div id='div1'></div>
<script>
var div = document.getElementById('div1');
div.innerHTML = "A&B";
</script>
</body>
---------------
IE6 renders the content of div1 as 'A'
Firefox renders the content properly as 'A&B'
If there is a space after ampersand, IE6 renders it properly. So I
think that IE is assuming anything after ampersand as an HTML entity
( like ).
Is this a bug in IE6? Is there any workaround for this?
Thanks
Kiran Makam
property. If the content contains an ampersand, text after the
ampersand is disappearing in IE6. It works properly in Firefox.
This is my code:
----------------
<body>
<div id='div1'></div>
<script>
var div = document.getElementById('div1');
div.innerHTML = "A&B";
</script>
</body>
---------------
IE6 renders the content of div1 as 'A'
Firefox renders the content properly as 'A&B'
If there is a space after ampersand, IE6 renders it properly. So I
think that IE is assuming anything after ampersand as an HTML entity
( like ).
Is this a bug in IE6? Is there any workaround for this?
Thanks
Kiran Makam