Skip to content

Instantly share code, notes, and snippets.

@web-zen
Created September 4, 2009 15:22
Show Gist options
  • Save web-zen/180939 to your computer and use it in GitHub Desktop.
Save web-zen/180939 to your computer and use it in GitHub Desktop.
// callback functions
function my_save(id, content){
var postData = "action=writefile&content=" + content;
var cObj = YAHOO.util.Connect.asyncRequest(
'POST',
'editor_db.php',
{
success: function (o) {
if (o.statusText == 'OK') {
// alert(o.responseText);
} else {
alert(o.statusText );
}
},
failure: function (o) {
alert(o.statusText);
}
},
postData
);
//alert("Here is the content of the EditArea '"+ id +"' as received by the save callback function:\n"+content);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment