Hi,
Is there a better way to replace a string as having & in the textarea breaks the script as it thinks its another & parameter?
function doRequest(){
var str = $('textarea#tr').val();
$.ajax({
type: "POST",
url: "index.php?sd=t",
data: "txt="+str.replace(/&/g, "and"),
success: function(){
$("div").css('color','red');
$("div").text('Saved');
$("div").fadeTo(800,1);
$("div").animate({backgroundColor:'#000000'}, 200);
$("div").animate({backgroundColor:'#FFFF90'}, 400);
stre = false;
}
});
}