WPCAPI.showAddPageDialogThis is a featured page


void WPCAPI.showAddPageDialog()
This utility method launches the Add Page dialog.

Parameters
StringparentIDThe parent cell ID for the newly created page.Required
String
DOMElement
dialogTitleThe title to use for the Add Page dialog. If the value is a DOMElement, then this method will first try to use its title attribute. If no title attribute exists, then the element's innerHTML will be used.Defaults to "Add Page"
StringparentTitleThe title of the parent cell; required if the parent cell does not yet exist, otherwise ignored.Defaults to current page title
StringparentURLThe URL of the parent cell; required if the parent cell does not yet exist, otherwise ignored.Defaults to current page URL

Usage


Minimal
if( window.WPCAPI ) WPCAPI.showAddPageDialog("Uncategorized");

Minimal (with custom title)
if( window.WPCAPI )WPCAPI.showAddPageDialog( "Uncategorized", "Contribute to " + document.title );

Strict
if( window.WPCAPI ) WPCAPI.showAddPageDialog( getCurrentPageID(), null, document.title, location.href );

Embedded HTML
<a href="#addPage" onclick="WPCAPI.showAddPageDialog( getCurrentPageID(), this, document.title, location.href ); return false;">Add a page</a>




DevinCanterberry
DevinCanterberry
Latest page update: made by DevinCanterberry , May 8 2008, 12:57 PM EDT (about this update About This Update DevinCanterberry Edited by DevinCanterberry


view changes

- complete history)
More Info: links to this page
Started By Thread Subject Replies Last Post
bejawada I tried this add page embedded HTML in my JSP page and it does not do 3 Jun 3 2008, 1:58 PM EDT by ryan_wetpaint
Thread started: Jun 3 2008, 10:23 AM EDT  Watch
do anything. It just points to the link of #addPage and thats about it. It does not actually take me to the dialog of adding a new page as in the wetpaint website. What am I doing wrong here.
Do you find this valuable?    
Show Last Reply
Showing 1 of 1 threads for this page

Related Content

  (what's this?Related ContentThanks to keyword tags, links to related pages and threads are added to the bottom of your pages. Up to 15 links are shown, determined by matching tags and by how recently the content was updated; keeping the most current at the top. Share your feedback on Wetpaint Central.)