setWebboxContent()

Pixelsilk API function to update the content of a webbox
Parameters:
webboxName: the name of the webbox control in the site
value: the actual content to update the webbox with
path: the path to the section (page) relative to the root

Output:
setWebboxContent returns a string containing the updated content for the webbox

C# Example:
string content = SetWebboxContent(webboxName, value, path);
Note the capital first letter of the C# method.

HTTP Example:
Request Headers:
POST /api2/setWebboxContent HTTP/1.1
HOST: www.example.com
Content-Length: 206
Content-Type: application/x-www-form-urlencoded
Cookie: auth=FA9325C869E1...211AAAD23E69

Request Data:
Unencoded Data:
json={
   "webboxName":"ExampleHtmlWebbox",
   "value":"This is the initial content.",
   "path":"/test/"
}&token=7AdbNHZQBtwc...RPTEK8UvSUQ=

Url-encoded Data:
json=%7b%0d%0a+++...%22%0d%0a%7d&token=7AdbNHZQBtwc...TEK8UvSUQ%3d

Response Headers:
HTTP/1.1 200 OK
Set-Cookie: auth=9B821B496D76...1EAD3CF18AD; path=/
Content-Type: text/javascript; charset=UTF-8
Content-Length: 30

Response Data:
"This is the initial content."

JavaScript Example:
Method Call:
pixelsilk2.setWebboxContent(input, callback)

Input Object:
{
    webboxName:"ExampleHtmlWebbox",
    value:"This is the initial content modified.",
    path:"/TestList/test/"
}

Returned Data:
"This is the initial content modified."

Back to Content »