djereg/ajax

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

Maintainers

Details

github.com/djereg/ajax

Source

Issues

Installs: 93

Dependents: 0

Suggesters: 0

Stars: 0

Watchers: 2

Forks: 1

Open Issues: 1

Language:JavaScript

dev-master 2015-09-12 23:47 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());