Do you have a requirement for specialised functionality built on concrete5? I am available for hire at an hourly rate or can offer a fixed price against a well defined requirement.

AJAX Lessons

Do not install this package on a real C5 site. Use it on a development site to help learn about AJAX.

This package is a learning experience, providing lesson examples of opening AJAX dialogs and exchanging AJAX data from a block, in Add, Edit and View. Examples are boiled down to a minimum to illustrate how they work (or dont).

Exchanging data between the browser and server using AJAX, or popping up a dialog using AJAX, from Concrete 5 is both straightforward and confusing. Straightforward because, once you boil it down to the basics, there is not much to it. Complicated because Concrete5 provides 3 slightly different ways of declaring AJAX action handlers. Which works best depends a lot on how you want to organise your package and in what context you want to use the AJAX transaction.

Rather than get bored and confused reading about all the various combinations and permutations, install this package on a development site and explore the behaviour of the blocks during Add, Edit and View:

  1. AJAX Data Lessons - uses 3 AJAX methods to send data from the browser to the C5 server and show the returned html.
  2. AJAX Dialog Lessons - uses 3 AJAX methods to load a C5 browser dialog from the C5 server.

AJAX is often combined with other JavaScript functionality, so in the dialog lessons we attempt to execute JavaScript from various places in various ways and using scripts declared in various sources, summarising success in a table.

See the documentation and dig into the source code for more details.

If you want to load blocks, stacks or page areas by AJAX, have a look at the Blocks by AJAX add-on.

See more addons by JohntheFish

Approved by PRB

Our 30 Day Support Policy

  • Replies to tickets every few days.

Support Hosted

  • On