Skip to content
Ronald Chan edited this page Mar 9, 2012 · 2 revisions

There are some terms which may help to understand some of the other guides.

AJAX Pagination is used to provide AJAX functionality. When AJAX functionality is triggered, something happens on part the page. This gem helps to change the content on part of the page. A site might have all sorts of different content, on different parts of the page, for example, the main content, surrounded by all sorts of widgets, perhaps dealing with the user account, perhaps displaying the latest news.

Each set of content may have a different set of links that should trigger a change in the content. For AJAX Pagination, parts of the page which may have their content changed is referred to as an AJAX section or just section. Each section is given a name. This is how AJAX Pagination can refer to the sections.

A name is a string of characters, preferably alpha-numeric (including underscores).

Once a section is defined with a name (using an ActionView helper method ajax_section), links can reference a section. By referencing a section, clicking the link will load the new content at the url location in the section. This might be referred to as ajaxifying the link (to find out how, see Creating AJAX links).

Some visual cues can be presented to the user, to show that a section is updating. The area where the visual cues display is referred to as a loading zone. This might be the whole section (which can be done by specifying an option), or it might be only part of the section, in which case another ActionView helper method ajax_loadzone is used. This might be done so that some of the links right at the top or at the bottom of the section remains enabled.

When a link is clicked, new content is loaded. The request can be referred to as an AJAX request to differentiate it from a plain web request, which loads and displays a full page. The server will send back its reply, the response. Some or all of the content in the response may then be displayed in the relevant section.