Version User Scope of changes
Oct 29 2008, 4:24 PM EDT (current) superwomyn 1 word added, 1 word deleted
Jun 2 2008, 7:34 PM EDT DevinCanterberry 2 words added

Changes

Key:  Additions   Deletions

boolean WPCAPI.onpagedelete()
This method is overloadableoverridable and should not be called directly.

This event is fired whenever a user attempts to delete a page, but before the page is allowed to be deleted. By default, this method simply allows the deletion to occur.

Parameters
StringcellIDThe identifier for the cell being deleted.Required
StringmessageThe edit note entered by the user.Defaults to ""
Returns true if the deletion is allowed, false otherwise.

Usage:

Asynchronous
if( window.WPCAPI ) {
WPCAPI.onpagedelete = function( cellID, message ) {

var params =
"cellID=" + encodeURIComponent(cellID)
+ "&message=" + encodeURIComponent(message);

var request = new XMLHttpRequest();
request.open( "DELETE"
, "/path/to/deletePage?" + params );
request.onreadystatechange = function() {

if( request.readyState == 4 )
WPCAPI.onpagedelete_Callback( request.status == 200, request.statusText );
};
request.send(null);

return null;

};
}