post(url[, callback])

Send data by POST method and retrieve responses synchronously or asynchronously.

Syntax

Parameters

url
Type: string
A page url which will receive data.
callback
Callback function to get responses. If this argument is not specified, it will work synchronously.
Return Value

An ajax response object.

Examples

var data = {a: 1, b: 3};
var result = $from(data).post("/test.php").text();
document.writeln(result);

/test.php
<?
print($_POST["a"] + $_POST["b"]);
?>

Result
4

Last edited May 18, 2012 at 1:08 PM by suckgamoni, version 2

Comments

No comments yet.