Including AJAX Libraries using Google

Friday, 08 May 2009
Rate this item
(0 votes)


If you are developing web applications and need to use javascript libraries from time to time you probably allready have read about the Google AJAX libraries API, which enables you to include nearly any javascript library with only two lines of code. You don't have to include the libraries into your package anymore.
As this is such a usefull solution we decided to write a short instruction how to use the Google AJAX libraries API for those who might have missed that opportunity.

{xtypo_quote}The AJAX Libraries API is a content distribution network and loading architecture for the most popular, open source JavaScript libraries. By using the Google AJAX API Loader's google.load() method, your application has high speed, globaly available access to a growing list of the most popular, open source JavaScript libraries.

Google works directly with the key stake holders for each library effort and accepts the latest stable versions as they are released. Once we host a release of a given library, we are committed to hosting that release indefinitely.

The AJAX Libraries API takes the pain out of developing mashups in JavaScript while using a collection of libraries. We take the pain out of hosting the libraries, correctly setting cache headers, staying up to date with the most recent bug fixes, etc.{/xtypo_quote}
First of all you have to enable the Google AJAX libraries API with the following code:

{xtypo_code}<script src=""></script>{/xtypo_code}

The second and allready the last step is to load the library itself and specify a version if desired, for example jQuery v1.2.6:

{xtypo_code}<script type="text/javascript">  google.load("jquery", "1.2.6");  </script> {/xtypo_code}

The versioning is optional and if left blank it will load the highest versioned release available. You can also only specify the sub version and it will then choose the highest versioned release of that series, for example "1.8" would load version 1.8.4 if that is the highest .8 version the moment and "1" would load v1.9.1 if that is the highest version overall.

The available libraries are (in the current versions):

{xtypo_code}   google.load("jquery","1.3.2");
.load("yui","2.7.0"); {/xtypo_code}

Googles Developer's Guide

Read 4652 times
More in this category: Joomla 1.6 custom parameters »
Login to post comments

Why freaked out?

The name "freaked out" does not symbolize our mental state but rather the approach to give our clients the unexpected - the extra edge - over their competitors to be successful in bussiness. That might appear from time to time a little freaked out but if you want plain vanilla work there are plenty of companies out there offering that. We go beyond.


If you have any questions or comments about our extensions or need help to get started please use our forums or the contact form. We will get back to you shortly!

Pro subscribers are advised to use the ticket system to receive premium support.


freaked out
53, Għaxqet L-Għajn
Triq Carini
Santa Venera - Malta

Email: This email address is being protected from spambots. You need JavaScript enabled to view it. uses cookies!

This website uses cookies to provide user authentication and improve your user experience. Please indicate whether you consent to our site placing these cookies on your device. We are not using cookies for marketing purposes. For more information visit our privacy policy

I agree
Copyright © 2010 - 2022 - All rights reserved