How can I show Russian text in a jQuery dialog title? In my case, it shows just this – ???????
Does anybody know why?
Calls showAjaxDialog:
$('.ajaxDialog').click(function () {
ShowAjaxDialog(true, 'Привет Мир', 330, 300, this.href);
return false;
});
AjaxDialog code:
function ShowAjaxDialog(isModal, title, width, height, url) {
// show a spinner or something via css
var dialog = $('<div style="display:none" class="ajaxDialogLoading"></div>').appendTo('body');
// open the dialog
dialog.dialog({
// add a close listener to prevent adding multiple divs to the document
close: function (event, ui) {
// remove div with all data and events
dialog.remove();
},
width: width,
height:height,
modal: isModal,
title: title
});
// load remote content
dialog.load(
url,
//{}, // omit this param object to issue a GET request instead a POST request, otherwise you may provide post parameters within the object
function (responseText, textStatus, XMLHttpRequest) {
// remove the loading class
dialog.removeClass('ajaxDialogLoading');
}
);
//prevent the browser to follow the link
}
Demo: http://jsfiddle.net/mhLc5/
Link: http://jqueryui.com/demos/dialog/
Code:
HTML: