Jump to content

SOLVED :: JQuery Ajax Encoding Problem


samerhannoun

Recommended Posts

Hi Guys,, I face a problem with IE7 and higher with AJAX request encoding, in brief, I have drop down menu contains folders names in Swedish language, and its contains some special characters, when the user change the select (dropdown) form element, there something should be done. everything is ok whith folders names thats not contain Swedish characters, the other folder(contain Swedish letters) when the user choose it nothing happen. So I think its encoding problem, what can I do to solve that?this is my function $("#edit-display-section").change(function(){ var txt= $("#edit-display-section option:selected").text();var fire = function(data) { document.getElementById('samer').innerHTML=(data); } $.ajax({ url: "calc/ajax/"+txt, type: 'POST', success:fire, contentType: "application/x-www-form-urlencoded;charset=utf-8", beforeSend: function(xhr) { xhr.setRequestHeader("Accept-Charset","utf-8"); xhr.setRequestHeader("Content-Type","application/x-www-form-urlencoded;charset=utf-8"); }, });the php file also UTF encode.thanks in advance for any help

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...