Problem with special characters - PHP & AJAX

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,

I'm writing a simple dictionary with php and ajax. It works perfects with
firefox but not in IE.
Here is the link

http://kllapa.com/fjahalori/test.html

I used alerts in js and find out that in the following function:

function updateMsgOnBrowser(testXML) {

	var test = testXML.getElementsByTagName("test")[0];
	var message=new Array(20);
	var m = new Array(20);
	var td = new Array(20);
	var i;
	for (i=1;i<=10;i++){
    	message[i]=testXML.getElementsByTagName("message"+i)[0];
        message[i+1]=testXML.getElementsByTagName("message"+i+"r")[0];
		if (message[i]!=null){m[i] = message[i].firstChild.nodeValue;}
else{m[i]=""}
		if (message[i+1]!=null){m[i+1] = message[i+1].firstChild.nodeValue;}
else{m[i+1]=""}
		td[i]= document.getElementById("td"+i);
		td[i+1]= document.getElementById("td"+i+"r");
        td[i].innerHTML=""+m[i];
		td[i+1].innerHTML=""+m[i+1];
    }
}

the line 

message[i]=testXML.getElementsByTagName("message"+i)[0];

becomes null in IE when tag message contains special character (ë, ç, Ë, Ç,
etc.). Why this works perfect in Firefox?

Any idea what could be the issue??


Thanks in advance
-- 
View this message in context: http://www.nabble.com/Problem-with-special-characters---PHP---AJAX-tp18311031p18311031.html
Sent from the PHP - General mailing list archive at Nabble.com.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux