Skip to content

Ajax request accepts get parameters.

Choose a tag to compare

@villesiltala villesiltala released this 19 Sep 08:28
· 102 commits to master since this release

The Dustpress.js ajax request now accepts get parameters which are appended to the request url. This is done by adding a string by the key get containing your get clause into your ajax requst params. Here's how it's done:

dp("SomeModel/SomeMethod", {
    tidy: true,
    get: "?lang=fi",
    success: function( data ) {
        // do what you want with the data
    },
    error: function( error ) {
        // possible error
    }
});