Using AJAX, jQuery and JSON, I'm adding a feature to a CMS panel allowing the user to select a page to edit from a dropdown menu, and then populating an input field and a textarea with the corresponding data from the db.
This already works fine, but for some reason the information is only being properly inserted into the fields if no special characters beyond the english alphabet are entered. I tried with ÆØÅ for instance, and these are a must-have for the product to be of any use.
Is there something inte the json_encode or jQuery.parseJSON() functions that stop me from using the Danish letters?
$.ajax({
type: 'post',
url: 'cms.php',
dataType: 'json',
data: { page: value },
success: function(data) {
var json = jQuery.parseJSON(data);
$('#title').val(json.title);
$('#pg').val(json.pg);
}
});