Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

why IE dont recognize characters when sending ajax request only with another language like arabic or farsi

I send a string for search with jquery ajax, it is working true in en lang alphanumeric characters, but dont work in cases that typing arabic or farsi lang.

this occur just in IE , this script working in chrome and firefox perfectly! you can see in here: http://webzzz.com

like image 251
hosein Avatar asked Dec 29 '25 17:12

hosein


1 Answers

I solved it: the problem was in the ajax script

**// this not working with ie browser when using arabic letters** 
xmlhttp.open("GET","livesearch.php?q="+str,true);
xmlhttp.send();

***// this will work in ie browser even with arabic letter after insert uncode(url)***
var uri = "livesearch.php?q="+str ;
var res = encodeURI(uri);
xmlhttp.open("GET",res,true);
xmlhttp.send();
like image 156
Mohamed Ramadan Avatar answered Jan 01 '26 09:01

Mohamed Ramadan



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!