I’m going to use a time interval to call function autoSave(). Inside the function I’m going to use AJAX to send the content what has been written inside the forms textarea. Hmmm, how do I get a variable or something that holds the text from the form to send with AJAX to a PHP page?
In the PHP page I’m going to use code like this to get te content of the textarea
$articleText = isset($_POST['articleText']) ? $_POST['articleText'] : '';
But I need some help to pass the text from the form togehter with som info like ?p=add-reply’
I guess the AJAX would look like something like this, but I’m not sure about the variables?
$.ajax({
url: "PStoreForm.php",
type: "POST",
dataType: "text",
data: ??????????????
});
This should work