Hi David, Google document a nicer way to deal with this in their documentation. The Google API can call a javascript callback when the library you requested has been loaded. http://code.google.com/apis/ajax/documentation/#GoogleLoad
Cheers, Alex On Dec 24, 11:44 pm, "speedpac...@gmail.com" <speedpac...@gmail.com> wrote: > Hi Mike, > > Sorry for the late response, but thanks a lot for this feedback. It > does indeed help. > I'm only a bit disappointed that I now have 4 <script>google.load()</ > script> blocks :) > > thanks a lot though! > David. > > On 17 dec, 03:08, Michael Geary <m...@mg.to> wrote: > > > > > Put your lines of code in separate <script> tags. > > > google.load() uses document.write() to write a <script> tag into the > > document. This <script> tag is not executed until the current <script> tag > > exits. So your jQuery.noConflict() call is being executed before jQuery is > > loaded. > > > If you break up the <script> tags like this, it should work fine: > > > <script type="text/javascript> > > google.load("jquery", "1"); > > </script> > > > <script type="text/javascript> > > jQuery.noConflict(); > > google.load("prototype", "1"); > > </script> > > > -Mike > > > On Wed, Dec 16, 2009 at 7:58 AM, speedpac...@gmail.com < > > > speedpac...@gmail.com> wrote: > > > Hi, > > > > For obvious reasons, we try using Google to load javascript libraries > > > when we need them. > > > We already used Prototype using google.load() function, and now we > > > decided to add jQuery as well since we will be using some jQuery UI > > > widgets to speed up development on a project (more specifically we > > > need a decent date selector! > > > > Basically, what we did is: > > > > google.load("jquery", "1"); > > > jQuery.noConflict(); > > > google.load("prototype", "1"); > > > > Unfortunately, for some reason, it complains that noConflict() is no > > > method leading me to believe tha the jQuery code isn't loaded properly > > > prior to calling the noConflict() method... > > > > We have never had such an issue in the past, and if we link directly > > > to the .js file hosted on google servers without using the google.load > > > () method, it works fine as well... > > > > Does anyone know this is a known issue when working with google.load > > > ()? > > > > Since we manage the needed libraries through a database, and use the > > > google.load() function for all these libraries, it would be a shame if > > > we need to include jQuery library directly without using the > > > google.load() method :) > > > > thanks in advance for your very much appreciated feedback! > > > > David.