All I need to know, is if it is possible to reference an external library (e.g. the places library from a javacript file as opposed to in the html page in script tags)?
The google documentation (http://code.google.com/apis/maps/doc...pt/places.html) recommends to put the reference in a script tag in the webpage like so:
Thanks in advance,
Then all of the included .js files can 'work together' calling upon the functions, variables and classes from each of the other .js files. The only thing that would matter is functions or code that is executed before another(or all) external .js files are loaded.
Thanks for the reply man.
So if I load the google library from my webpage, all my other external .js's will be able to access the library's functions provided the external one is loaded afterward the google one?
That is correct. You will be able to call any of the functions or variables from the google .js library from your own external .js files. The order in which they are loaded matters but it seems you understood that part as well so I don't think I need to explain.
Originally Posted by rossrossp
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Tags for this Thread