T
Tom de Neef
My app is browser based. It starts with a html page displaying a family
structure. Click on a name and that person will be the focus in the
re-generated page. The re-generation is with JavaScript.
A name in the original page may contain a diacritic (u - umlaut, e - grave,
etc. They appear in the text as ANSI characters, not as ü codes.) They
come out OK.
But two clicks further, the diacritcs have changed into little squares.
I have experimented and simplified the code as follows (still showing this
behaviour):
Original html:
<HTML>
<HEAD><SCRIPT type="text/javascript" SRC="GGshowAll.js"></SCRIPT></HEAD>
<BODY>
<SCRIPT type="text/javascript">
document.write('<HTML><BODY>'+ShowNearbyFamily(2070)+'</BODY></HTML>')
</SCRIPT>
</BODY></HTML>
Function ShowNearbyFamily(index) is defined in the external 'js' file. The
OnClick in the file's code which must result in the redo of the page calls
it again via Refocus(index):
function Refocus(index)
{ var txt =
'<HTML>'+
'<HEAD><SCRIPT type="text/javascript"
SRC="GGshowAll.js"></SCRIPT></HEAD>'+
'<BODY>'+
ShowNearbyFamily(index)+
'</BODY></HTML>'
document.write(txt)
document.close()
}
A first click is in the original html. Its result is still OK. The next
click is in a page produced by the script. Its result is without the correct
diacritics in IE. It is OK in FF.
The (IE) source of the generated page shows a ? for any diacritic.
I do not understand this. In all cases the output is generated by the same
function (ShowNearbyFamily). It just takes the data from a list. I have no
idea where to start looking for a solution. I tried extra's like charset
definitions in the meta tags, document type definitions before the HTML tag.
Any ideas will be very much appreciated.
Tom
structure. Click on a name and that person will be the focus in the
re-generated page. The re-generation is with JavaScript.
A name in the original page may contain a diacritic (u - umlaut, e - grave,
etc. They appear in the text as ANSI characters, not as ü codes.) They
come out OK.
But two clicks further, the diacritcs have changed into little squares.
I have experimented and simplified the code as follows (still showing this
behaviour):
Original html:
<HTML>
<HEAD><SCRIPT type="text/javascript" SRC="GGshowAll.js"></SCRIPT></HEAD>
<BODY>
<SCRIPT type="text/javascript">
document.write('<HTML><BODY>'+ShowNearbyFamily(2070)+'</BODY></HTML>')
</SCRIPT>
</BODY></HTML>
Function ShowNearbyFamily(index) is defined in the external 'js' file. The
OnClick in the file's code which must result in the redo of the page calls
it again via Refocus(index):
function Refocus(index)
{ var txt =
'<HTML>'+
'<HEAD><SCRIPT type="text/javascript"
SRC="GGshowAll.js"></SCRIPT></HEAD>'+
'<BODY>'+
ShowNearbyFamily(index)+
'</BODY></HTML>'
document.write(txt)
document.close()
}
A first click is in the original html. Its result is still OK. The next
click is in a page produced by the script. Its result is without the correct
diacritics in IE. It is OK in FF.
The (IE) source of the generated page shows a ? for any diacritic.
I do not understand this. In all cases the output is generated by the same
function (ShowNearbyFamily). It just takes the data from a list. I have no
idea where to start looking for a solution. I tried extra's like charset
definitions in the meta tags, document type definitions before the HTML tag.
Any ideas will be very much appreciated.
Tom