We have a page which has some dynamic combo boxes which are initially populated data from a database which contain HTML special characters such as uml and acutes. However as they are dynamic various parts of the page populate the combo box with a refreshed list via a Javascript Array. However this then shows the special characters literally i.e. é rather than the actual character.
how can we get round this. here is a small sample page to show our problem.
<html>
<head>
<script>
test = new Array;
test[0]=new Array("Täbert","test");
test2 = "Täubert";
function setVal1()
{
document.gui.aSelect.options[0].text = "1 - " + test[0][0];
}
function setVal2()
{
document.gui.aSelect.options[0].text = "2 - Täubert";
escapeXml="false"
}
</script>
</head>
<body>
<FORM NAME="gui">
<SELECT NAME="aSelect">
<OPTION VALUE="deafert">Taubert
</SELECT>
<P>
<INPUT TYPE="button" VALUE="Copy from array in
JS" onclick="setVal1()">
<P>
<INPUT TYPE="button" VALUE="Set explicitly from
JS function" onclick="setVal2()">
<P>
<INPUT TYPE="button" VALUE="Set explicitly from HTML" onclick="document.gui.aSelect.options[0].text = '3 - Täubert'">
<P>
<INPUT TYPE="button" VALUE="Copy from
JS array explicitly from HTML" onclick="document.gui.aSelect.options[0].text = '4 - ' + test[0][0]">
<P>
<INPUT TYPE="button" VALUE="Copy from
JS variable explicitly from HTML" onclick="document.gui.aSelect.options[0].text = '5 - ' + test2">
</FORM>
</body>
</html>