WPCAPI.onpagerenameThis is a featured page


boolean WPCAPI.onpagerename()
This method is overridable and should not be called directly.

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

Parameters
StringcellIDThe identifier for the cell being renamed.Required
StringtitleThe new title of the cell.Required
StringmessageThe edit note entered by the user.Defaults to ""
Returns true if the renaming is allowed, false otherwise.

Usage:

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

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

var request = new XMLHttpRequest();
request.open( "PUT", "
/path/to/renamePage" );
request.onreadystatechange = function() {

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

return null;

};
}




superwomyn
superwomyn
Latest page update: made by superwomyn , Oct 29 2008, 2:06 PM EDT (about this update About This Update superwomyn Changing overload to override. - superwomyn

1 word added
1 word deleted

view changes

- complete history)
Keyword tags: rename page
More Info: links to this page
There are no threads for this page.  Be the first to start a new thread.