PHPackages                             pessek/pessek\_ajax - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. pessek/pessek\_ajax

ActiveElgg-plugin[Utility &amp; Helpers](/categories/utility)

pessek/pessek\_ajax
===================

Ajax utilities

v4.0(4y ago)05proprietaryPHPPHP &gt;=7.4

Since Oct 17Pushed 4y ago1 watchersCompare

[ Source](https://github.com/rheman/pessek_ajax)[ Packagist](https://packagist.org/packages/pessek/pessek_ajax)[ RSS](/packages/pessek-pessek-ajax/feed)WikiDiscussions main Synced today

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

Pessek Ajax
===========

[](#pessek-ajax)

[![Elgg 4.0](https://camo.githubusercontent.com/b1d01246e0107a41c37e5a81857f07c8eef37b85e910c4ff09f8bad002634eb5/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f456c67672d342e302d677265656e2e737667)](https://camo.githubusercontent.com/b1d01246e0107a41c37e5a81857f07c8eef37b85e910c4ff09f8bad002634eb5/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f456c67672d342e302d677265656e2e737667)

Utilities for AJAX requests

- Deferred view rendering

Usage
-----

[](#usage)

### Deferred view rendering

[](#deferred-view-rendering)

To defer view rendering, simply add `'deferred' => true` to view vars.

```
echo elgg_view('my_view', [
	// tells the view system to defer view render
	'deferred' => true,

	// if set to false, placeholder will not be rendered
	// if set to a value, that value will be used as the placeholder
	// if not set, default ajax loader will be used
	'placeholder' => false,

	// you can pass other view vars, as you would with normal views
	// various Elgg data will be serialized and available to the deferred view
	// some of the values may need to be wrapped into a Serializable instance
	'entity' => get_entity(123),
	'user' => get_user(234),
]);
```

### Ajax Forms

[](#ajax-forms)

`ajax/Form` AMD module can be used to chain promise-based submit callbacks and submit the form via Ajax.

```
var Form = require('ajax/Form');
var form = new Form('.my-form');
var Ajax = require('elgg/Ajax');

form.onSubmit(function(resolve, reject) {
	// execute a long running script, e.g. validate fields via ajax
	var ajax = new Ajax();
	ajax.post('somewhere').done(resolve).fail(reject);
})

form.onSubmit(function(resolve, reject) {
	console.log('hello');
	resolve();
});

// By default, once all promises are resolved, the form will be submitted via ajax,
// and the user will be forwarded to the URL specified by the response
// You can however register custom success callbacks to prevent redirection

form.onSuccess(function(data) {
	console.log(data);

	require('elgg/lightbox', function(lightbox) {
		lightbox.close();
	});

	$('.my-list').refresh();
});

// You can also add your own error handler

form.onError(function(error) {
	console.log(error);
});
```

###  Health Score

22

—

LowBetter than 21% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

1720d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/17824857?v=4)[rhemandaddy](/maintainers/rhemandaddy)[@rhemandaddy](https://github.com/rhemandaddy)

---

Tags

pluginelggcontentblog

### Embed Badge

![Health badge](/badges/pessek-pessek-ajax/health.svg)

```
[![Health](https://phpackages.com/badges/pessek-pessek-ajax/health.svg)](https://phpackages.com/packages/pessek-pessek-ajax)
```

###  Alternatives

[helsingborg-stad/municipio

A bootstrap theme for creating municipality sites.

4028.5k10](/packages/helsingborg-stad-municipio)[coldtrick/thewire_tools

Extend the functionality of The Wire

133.2k](/packages/coldtrick-thewire-tools)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
