Cjax Ajax Framework 5.x

The world's most comprehensive, easiest, flexible and smallest Ajax Framework written in PHP.

"Imagine being able to control all aspects of your application through back-high-end code, without client worries" -Cj

Top 3 countries downloading

  • United States 22%
  • India 17%
  • China 9%

Cjax is an MVC (Model-View-Controller) oriented, lightweight (>100kb) ajax framework aimed at PHP applications/sites. It allows you to literally execute JavaScript with PHP, sounds facinating - eh? Well it's true (You may test some demos).

Cjax is self explanatory, just by looking at the syntax you can tell right away what is it doing, and what's best about it is that, that's all there is to it; there is no Javascript to produce or inline codes in your html, just plain and simple PHP, Cjax takes care of the rest through its sofisticated data processor.

Cjax is a complete interpreter/generator that uses a combination of data services including xml/json - Cjax comes with a very basic API that is covered through documentation. Cjax developement has been paintaking, for example the minute that it starts being loose or complicated or slow or the likes, it is re-written to meet the highest standards, while being innovative and keeping the goals in place. There would be no point of it it was otherwise. Yes very demanding, that is why we are convinced that it can speed up your ajax development by 60% once you learn the API and become accustomed.

There are many things that are unique that require JavaScript still that may not be covered by Cjax's API, here is where Cjax's plugins come in. Cjax Plugins are hybrid and very powerful and as flexible as you build them. Allow you to create scalable functionality in PHP and provide you with the means, data transport and API to interact with JavaScript in a scalable way, allow you to create your own plugin controller, classes, Javascript files, css, and import other JavaScript all with the usual simplistic Cjax's way using 'Convention Over Configuration' pattern, with one line of code most of the time. Cjax plugin API can be tricky to learn at first but if you start with the basics and use Plugin Docs and examples available you can build comprehensive plugins that can be as powerful as any part of the framework itself.

Another feature Cjax offers is that it allows you to (without eval) access JavaScript functions, objects, elements, and properies through PHP - even if they are not from Cjax, yes anything on the page. With a simple and generic Syntax like the rest of the APIs, see example.

Cjax Lives in harmony with other frameworks and it complements PHP Frameworks such as Cakephp, CodeIgnater, Zend, and can be installed on any website or application in tops 5 minutes.
It is compatible with most of all modern web browsers, and it requires zero configuration. Forget Inline Javascript, forget snipets, Cjax processess your page in Event Listeners, and also is fully compatible with jQuery and easy to integrate with other 3rd party JavaScript libraries or frameworks, but requires none.

Why is Cjax Superior?

While there are other options online that may allow you to interact with ajax and php, there is nothing - and I mean nothing even close or that can compare to Cjax's core. The first and most "popular" options you'll find take 10 to 20 times more code to accomplish what Cjax's does with one line of code, and not to mention the footprint they leave on your pages. Not to brag but none of them include some of the most basic features you find in Cjax, such as it's MVC design, while Cjax is smaller in size!. Likely 20 more reasons!

Lets get to the fun part...

Before you download the framework, We'd like you to get familiar how to set it up and get it working so that you don't end up stuck, that would beat the purpose wouldn't it? You may also review Cjax's documentation.

Latest Release

5.1-Stable was released on Sep 16, 2012, See release Notes.


To avoid confusion between releases, we are listing the available downloads here:


Here are the steps to get the framework installed on your site, or test installation:
  • Looking for CodeIgniter Installation Instruction? Go here.
  • 1. After you have downloaded the latest release-

    Place the contents of the zip on the root of the site merging it with your current site.
    So you'd end up with your current structure plus:
  • You are set. Now lets test...


Using an older version?. To upgrade simply download the newest version and overwrite all Cjax files, in most cases that should be enough to upgrade to a newer version.

Testing your Cjax Installation

For security reasons you cannot access ajax.php directly on your browser, but that is why we include testing.php.
Go onto your browser and type in the url for your site, plus testing.php?test/test, eg: http://yoursite.com/testing.php?test/test
If you see the text "Ajax View..." on your browser, that means you have successfully installed and tested the ajax framework.
You may find the text in file controllers/test.php in function test(). If your installation was successful you may delete file testing.php.

Download 20+Demos/Samples included in demos zip


What's included in the zip?

Before you download the Demos/Samples, make sure you have successfully installed the ajax framework.

Some of the demos described below are "clikable".

The zip includes some Ajax samples and Usage samples of the Cjax API and full samples source code. Some demos are:
Upload Files through Ajax, Making ajax requests, Submitting forms with ajax, Overlays Lightboxes, Dialog, Cross Domain Ajax, Messaging, Search, and others.

How to use the demos/samples

  • Place the "examples" folder included in the zip in your root installation,
    and access it by going to your site url: yoursite.com/examples. Make sure the Ajax Framework is installed before you try to test the samples.


Cjax's documentation is available and you should definitely go through it if you intend to use Cjax.


How to install plugins

To install a plugin, download a plugin zip and place the contents of the zip inside the "cjax/plugins" directory.

Download Plugins

Creating Plugins

Cjax provides a vehicle in which you can transmit data across from PHP to JavaScript,
this vehicle is the plugin system. It allows you to use the $ajax object for your own custom code, in CJAX API format, so not only you can use the existing API, but you can also create your own without making changes to the core files. Below are some examples zips that we have put together, they come fully documented between the lines in the source code, so be sure to read the comments between the lines. They are not functional plugins, the only purpose is to explain how to use them and how to develop them, including sample of Plugins core API.

Community Contributions

While you develop and if you happen to create changes to the core that you think would facilitate the overall process of plugin development, you may suggest these changes to Cj Galindo, he will review all requests and he just might add these changes to the next release. This is an open community and we are always looking for improvements.
You may also donate a few dollars as an appreciation token to our hard work.

Emailing List

You may stay up to date with updates and important releases news, subscribe to the emailing list. You may unsubscribe at any time.

© Cj Galindo SourceForge.net Logo Support This Project Cross Browser