Delete Partial Content

Syntax

$.deletePartial = function (url, id)

Arguments

url

String

URI of the action whose content should be deleted.

id

String

Identifier of the Page Section whose content should be deleted.

Description

Loads data from the Server into the Page Section specified in the parameter “id” by sending an HTTPDELETE request to the action of the URI specified in “url”. It should be used when the action of the URI deletes data from the database.

If parameter “chg” is set to true, the current URI gets changed into the URI specified in “newURL”. If argument “chg” is set to true and argument “newUrl” is empty, then the URI gets changed into the URI specified in “url”.

If the URI that is specified in “newURL” does not exist or contains a spelling error, the function will still treat it as valid URI and load the page but an error message from the browser will likely follow.

Example

The following program illustrates the function call:

$.putPartial("main/partialdelete/" + 1234, "div-container-example");

It will send a request to “main/partialdelete” along with the parameter of the action set to 1234 (specifying the data to be deleted) and load the response into the Page Section by the id of “div-container-example” replacing the content that is currently displayed in that Page Section. The URI in the address bar stays the same.

Last updated