djereg/ajax

Cliet side wrapper for jQuery's Ajax with some useful methods, and PHP side response library.

This package's canonical repository appears to be gone and the package has been frozen as a result.

Maintainers

Details

github.com/djereg/ajax

Installs: 114

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 3

Forks: 1

Language:JavaScript

dev-master 2015-09-12 23:47 UTC

This package is not auto-updated.

Last update: 2024-01-20 12:07:15 UTC


README

Installation

<script src="/path/to/ajax-request.js"></script>

Basic Usage

Request

var ajax = AjaxRequest();

ajax.request({
	url: 'path/to/ajax.php',
	data: {
		foo: 'bar'
	}
});

Response

include 'AjaxResponse.php';

$ajax = new AjaxResponse();

$ajax->alert('foo');

echo json_encode($ajax->get());