Hi,
I am trying to set the charSet in a jquery call the site I am making is for a Lithuanian friend thus has some letters with accents etc.
As far as my research so far (2 days worth!!!) has shown, I need to place it in the beforeSend section which I have done as follows:
$(document).ready(function(){
$('.content').load('home.html'); //by default initally load text from boo.php
$('#navlist a').click(function() { //start function when any link is clicked
$(".content").slideUp("slow");
var content_show = $(this).attr("title"); //retrieve title of link so we can compare with php file
$.ajax({
method: "load",url: ""+content_show,
beforeSend: function(){
XMLHttpRequest.setRequestHeader("Content-Type", "text/plain;charset=UTF-8");
$("#loading").show("fast");
}, //show loading just when link is clicked
complete: function(){ $("#loading").hide("fast");}, //stop showing loading when the process is complete
success: function(html){ //so, if data is retrieved, store it in html
$(".content").show("slow"); //animation
$(".content").html(html); //show the html inside .content div
}
}); //close $.ajax(
}); //close click(
}); //close $(
I have tried changing it to
setRequestHeader("Content-Type", "text/plain;charset=UTF-8");
Which also does not work, so now I am stuck and at the end of my nerves having looked around for two days.
The website can be viewed at 43dennis.co.nr/bivakas Basically it loads with a bunch of square black questions marks in place of the letters with special accents.
Many thanks for the help.