From: Garrett Smith on 29 Nov 2009 21:58 David Mark wrote: > On Nov 27, 2:19 pm, Garrett Smith <dhtmlkitc...(a)gmail.com> wrote: >> Jorge wrote: >>> On Nov 27, 7:56 am, Garrett Smith <dhtmlkitc...(a)gmail.com> wrote: >>>> (...) [...] > > The only sane solution is to call the callback from the loaded > script. jQuery already has that (though slightly more elaborate). The script calls jQuery.ready. If the jQuery.isReady flag is true, then the callback fires immediately. Otherwise, the callback is added to an Array. if ( jQuery.isReady ) { // Execute the function immediately fn.call( document, jQuery ); } else { // Otherwise, remember the function for later // Add the function to the wait list jQuery.readyList.push( fn ); } A call to jQuery.ready after the had fired would call that function. -- Garrett comp.lang.javascript FAQ: http://jibbering.com/faq/
From: Richard Maher on 30 Nov 2009 05:13 Hi Bob, "beegee" <bgulian(a)gmail.com> wrote in message news:abb20176-72dc-4f38-8f1f-3e4e2bba8289(a)l13g2000yqb.googlegroups.com... > On Nov 26, 6:57 pm, Thomas 'PointedEars' Lahn <PointedE...(a)web.de> > wrote: ... > Perhaps I'm mistaken and the realm of the *connected* application is > to be claimed by Air or Silverlight. That means, though, that what we > do; program javascript in client browsers will be relegated to adding > fancy geegaws and doodads to static web pages. Once again there is the middle option. Flex, Silverlight, and JAVA *all* open up their objects and methods to Javascript interaction. Adobe's FABridge, Silverlight's HTML Bridge, and JAVA's just always done it +/- LiveConnect. How much, or little, web-page real estate they occupy is up to you. (I've personally used a faceless JAVA applet to retrieve employee data from a socket and populate Flex ArrayCollections that became the data source for Pie Charts and Data Grids. All happily co-existing on the same page with bog-standard HTML fields and markup.) The only people trying to lock you into an anti-plugin, anti-functionality, anti-choice view of the world is that group of wheel re-inventors over at HTML5. (Sadly, I expected something more than their square-shaped offerings such as WebSockets) ... > Bob Cheers Richard Maher
From: beegee on 30 Nov 2009 10:02 On Nov 30, 5:13 am, "Richard Maher" <maher...(a)hotspamnotmail.com> wrote: > Hi Bob, > > "beegee" <bgul...(a)gmail.com> wrote in message > > news:abb20176-72dc-4f38-8f1f-3e4e2bba8289(a)l13g2000yqb.googlegroups.com... > Once again there is the middle option. Flex, Silverlight, and JAVA *all* > open up their objects and methods to Javascript interaction. Adobe's > FABridge, Silverlight's HTML Bridge, and JAVA's just always done it +/- > LiveConnect. How much, or little, web-page real estate they occupy is up to > you. (I've personally used a faceless JAVA applet to retrieve employee data > from a socket and populate Flex ArrayCollections that became the data source > for Pie Charts and Data Grids. All happily co-existing on the same page with > bog-standard HTML fields and markup.) > Richard, I agree with you up to a point. I have used Silverlight datagrids that get populated via XML->javascript->SL. The silverlight control exists more-or-less happily with the DOM. There is still quite a separation though, especially with graphics coordinates. My experience with java applets was a complete nightmare and I was in front of the line to dance on the coffin. Datagrids in Flash and Silverlight have problems still both with UI and rendering. If the browser did a little faster job of rendering large tables, I would gladly dump Silverlight. So, yup, I'll use the plugins to overcome shortcomings of the browser but if HTML5 solves those shortcomings, I'm definitely dumping the plugins. Bob
From: David Mark on 30 Nov 2009 23:50
On Nov 29, 9:58 pm, Garrett Smith <dhtmlkitc...(a)gmail.com> wrote: > David Mark wrote: > > On Nov 27, 2:19 pm, Garrett Smith <dhtmlkitc...(a)gmail.com> wrote: > >> Jorge wrote: > >>> On Nov 27, 7:56 am, Garrett Smith <dhtmlkitc...(a)gmail.com> wrote: > >>>> (...) > [...] > > > The only sane solution is to call the callback from the loaded > > script. > > jQuery already has that (though slightly more elaborate). The script > calls jQuery.ready. If the jQuery.isReady flag is true, then the > callback fires immediately. Otherwise, the callback is added to an Array. But the isReady flag is dubious as it relies on jQuery's mixed up DOMContentLoaded simulation. It's all fruit of a poisonous tree. |