views:

105

answers:

3

I'm developing a webapp/website on my local machine and won't know the url I'm using for it, but I'd like to use Google's hosted javascript APIs. Anyone know how I'd go about doing this?

+1  A: 

You can even get a API key for a local machine. Let's say you use http://localhost or http://your-machine-name you can get a API key for this URL. I have done that to be able to check my JavaScript within my local XAMPP dev system.

But opening the file through file:// might fail in this case.

EDIT: If you just want to use the Google hosted AJAX APIs like jQuery or Prototype and you don't want to load them with google.load(), you don't need a key. Just use the absolute links you can find on this page: http://code.google.com/apis/ajaxlibs/documentation/index.html#jquery

Kau-Boy
perfect! I'll try that
jphenow
A: 

You don't need a key to use the Google AJAX Javascript Libraries API itself. Only some of the libraries requires a key to load.

You can still use their JSAPI to load 3rd party libraries such as jQuery, dojo, prototype and so on.

Could you please specify which libraries you are using?

mekwall
Mostly I'd like to use jQuery
jphenow
+1  A: 

You can get jQuery from Google's CDN via http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js For any other information in this regard you may want to refer to http://code.google.com/apis/ajaxlibs/documentation/#AjaxLibraries . And just have a look at the library Paths. You do not need any API key for this.

Shubh
You can get the non-minified dev version from http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.js
Shubh