Hello,
I am working on a site which utilizes PHP/JS and the new found XMLHTTP
frenzy to update dynamically.
WHile the whole mechanism works beautifull, i can't get to display
greek Characters correct (They show up as ?).
I tried following solutions to set the XML:lang or simple lang
parameter in the div to el, but that didn't help.. Greek text in the
surrounding page is showing up correct..
Here is the code i am using:
The JS File
if (!xmlhttp && typeof XMLHttpRequest! ='undefined') {
xmlhttp = new XMLHttpRequest( );
}
function loadFragmentInT oElement(fragme nt_url, element_id) {
var element = document.getEle mentById(elemen t_id);
element.innerHT ML = 'Loading ...';
xmlhttp.open("G ET", fragment_url);
xmlhttp.onready statechange = function() {
if (xmlhttp.readyS tate == 4 && xmlhttp.status == 200) {
element.innerHT ML = xmlhttp.respons eText;
}
}
xmlhttp.send(nu ll);
}
The client PHP:
<?php
include ("../_mssqlconnect.p hp");
include ("get_login_dat a.php");
?>
<script>
function offerDetails(id )
{
loadFragmentInT oElement('sc_og details.php?ogi d='+id, 'ogDetails');
}
</script>
//......
?>
<span lang="el" id="ogDetails" align="left"></span>
The server PHP:
<?php
include ("../_mssqlconnect.p hp");
//.......
echo "<div lang=\"el\">
<table class='sp_table ' width=300 align=center>
<tr>
<td align=center><b >{here the greek Text which doesnt come
out right}<b></td>
</tr>
</table></div>";
ANy hints?
thanks