[CODE=javascript]var xmlHttp;
var m_placeholder;
function executeProcess( serverscriptfil e, placeholder, posts) {
alert(posts);
xmlHttp=GetXmlH ttpObject();
if (xmlHttp==null)
{
alert ("Browser does not support HTTP Request");
return;
}
m_placeholder = placeholder;
var url=serverscrip tfile;
//url=url+"?"+str ;
url=url+"?sid=" +Math.random();
xmlHttp.onready statechange=sta teChanged;
//xmlHttp.open("G ET",url,true)
//xmlHttp.send(nu ll)
xmlHttp.open("P OST", url, true);
xmlHttp.setRequ estHeader("Cont ent-Type", "applicatio n/x-www-form-urlencoded");
//strPosts = buildPostReques t(posts);
//xmlHttp.send(po sts);
xmlHttp.send(po sts);
}
function stateChanged() {
if (xmlHttp.readyS tate==4 || xmlHttp.readySt ate=="complete" )
{
document.getEle mentById(m_plac eholder).innerH TML=xmlHttp.res ponseText;
}
}
}
function GetXmlHttpObjec t() {
var xmlHttp=null;
try
{
// Firefox, Opera 8.0+, Safari
xmlHttp=new XMLHttpRequest( );
}
catch (e)
{
//Internet Explorer
try
{
xmlHttp=new ActiveXObject(" Msxml2.XMLHTTP" );
}
catch (e)
{
xmlHttp=new ActiveXObject(" Microsoft.XMLHT TP");
}
}
return xmlHttp;
}[/CODE]
I implement the above code. The xmlHttp.respons eText contains Japanese characters.
Problem: It returns all the information I need and also successfully put all the controls like textboxes, tables, labels but all the japanese characters was a garbaged.
var m_placeholder;
function executeProcess( serverscriptfil e, placeholder, posts) {
alert(posts);
xmlHttp=GetXmlH ttpObject();
if (xmlHttp==null)
{
alert ("Browser does not support HTTP Request");
return;
}
m_placeholder = placeholder;
var url=serverscrip tfile;
//url=url+"?"+str ;
url=url+"?sid=" +Math.random();
xmlHttp.onready statechange=sta teChanged;
//xmlHttp.open("G ET",url,true)
//xmlHttp.send(nu ll)
xmlHttp.open("P OST", url, true);
xmlHttp.setRequ estHeader("Cont ent-Type", "applicatio n/x-www-form-urlencoded");
//strPosts = buildPostReques t(posts);
//xmlHttp.send(po sts);
xmlHttp.send(po sts);
}
function stateChanged() {
if (xmlHttp.readyS tate==4 || xmlHttp.readySt ate=="complete" )
{
document.getEle mentById(m_plac eholder).innerH TML=xmlHttp.res ponseText;
}
}
}
function GetXmlHttpObjec t() {
var xmlHttp=null;
try
{
// Firefox, Opera 8.0+, Safari
xmlHttp=new XMLHttpRequest( );
}
catch (e)
{
//Internet Explorer
try
{
xmlHttp=new ActiveXObject(" Msxml2.XMLHTTP" );
}
catch (e)
{
xmlHttp=new ActiveXObject(" Microsoft.XMLHT TP");
}
}
return xmlHttp;
}[/CODE]
I implement the above code. The xmlHttp.respons eText contains Japanese characters.
Problem: It returns all the information I need and also successfully put all the controls like textboxes, tables, labels but all the japanese characters was a garbaged.
Comment