Witam, mam skrypt, który służy do podglądu na żywo np. przy pisaniu notki na bloga. Wszystko działa, ale z jednym małym problemem, otóż nie wyświetla się znak &. Wszystkie znaki są wyświelane, ale gdy napiszę w tekście znak &, podgląd zatrzymuje się i nie wyświelta tego znaku oraz żadnych innych pisanych po nim. Co jest nie tak? Bardzo proszę o pomoc. Poniżej kod ajax:
function podglad() {
var request = NewObject();
if (request) {
request.onreadystatechange = function() {
if (request.readyState==4) {
if (request.status==200) {
document.getElementById('wynik').innerHTML=request.responseText;
}
}
}
};
content = document.getElementById('pole').value;
var url = 'podglad.php';
var string = 'notka='+content;
request.open('post', url, true);
request.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
request.setRequestHeader("Content-length", string.length);
request.setRequestHeader("Connection", "close");
request.send(string);
}