Update Page Content using SPServices

Oct 3, 2014 at 3:21 PM
I am trying to update a Page's content using SPServices.

When I run my code, it does update the correct page, but instead of updating the content, it just removes the content.
var newContent = "<p>This is a test</p>";

$().SPServices({
   operation: "UpdateListItems",
   listName: "Pages",
   ID: itemID,
   async: false,
   valuepairs: [["PublishingPageContent", newContent]]
})
Oct 16, 2014 at 4:12 AM
Edited Oct 16, 2014 at 4:12 AM
If you want to update a page's content then the jQuery script has to be run from the page itself.