Delete Action

Syntax

$.deleteAction = function (url, callback)

Arguments

url

String

URI of the action whose content should be deleted.

callback

function

Contains calls of Javascript functions that should be executed in series after receiving data from action specified in “url”.

Description

Sends an HTTPPUT request to the action of the URI specified in “url”. If it successfully receives return data from the Server, the callback function will be executed. It should be used when the action of the URI deletes data from the database.

Example

The following program illustrates the function call:

$.deleteAction("main/delete" + 1234, function () { alert("success"); }) 

Function sends request to the action “main/delete” along with the parameter of the action set to 1234 (specifying the data to be deleted). When the function receives returned data from the Server, the “alert” function will output “success” on the screen.

Last updated