ASK - AJAX Source Kit

The purpose of ASK is to offer you a simple way to get content into your page on-the-fly through asynchronous JavaScript and XmlHttpRequest, without sacrificing accessibility or usability.

The version displayed here includes an accessible version for people without JavaScript and/or XmlHttpRequest, so try turning off your JavaScript and test it. Each link that gets content from its href value automatically adds ajax=true to the query string, and detects if there are other parameters in it too. The point of this is for you to implement functionality in the receiving page to only deliver desired content when an AJAX call is made, but also that you, with the same URL can return a full page with content if it isn't an AJAX call.

All the links in this demo points to the same URL, but that's only for easier maintenance issues. You can have links with as many different URLs as you desire. ASK functionality is also automatically added to content you've retrieved with ASK. For instance, try the link retrieved in the Show cities-column.

ASK also supports using the forward and back buttons in the browser as well as offering support for bookmarking a page after certain AJAX calls have been made, as to not lose out on usability. It also caches already retrieved responses in a JavaScript array and then references that for further requests to the same link.



You can either download this full demo, with ASP and PHP examples for accessibility, or you can download the ask.js file (8.3 kb).

Web browser support

History feature not working in these web browsers

Bookmarking feature not working in these web browsers


Click the links below to see the ASK functionality.

Get continents
Get countries
Get cities