I've got an HTA application (IE 6) that I've been trying, as an experiment, to convert to run under FireFox. The application would now be called "AJAX" although it wasn't when I started.
It's essentially a client-side app done completely in DHTML - all source code is requested via internal HTTP calls, all presentation is done via script. I ultimately failed, but learned a lot and thought some of it might be interesting: 1) FireFox does indeed the "onresize" event. However were IE calls the event continuously as the frame is being resized FireFox calls it only at the end of the motion. Not a big deal but IE's implementation makes resizing seem smoother. 2) FireFox does not allow simple values to be applied to style declarations. For example the following works in IE: App.Layout.Body.style.height = App.Layout.App.clientHeight - ( App.Layout.Menubar.offsetHeight + App.Layout.Statusbar.offsetHeight) + "px"; But will return blank in FireFox. Adding "px" to the declaration appeases FireFox but kills IE: App.Layout.Body.style.height = App.Layout.App.clientHeight - ( App.Layout.Menubar.offsetHeight + App.Layout.Statusbar.offsetHeight) + "px"; I've yet to find a simple solution that works in both (but I'd love to hear one!) 3) FireFox will not allow the direct assignment of a function to an object. This will work in IE, but not FF: Function App.SetLayout { ... }; However it will allow a function literal to be assigned - and this works in BOTH: App.SetLayout = function() { ... }; (I use such contructs similar to the way scopes are used in CF - there's an "App" scope and a "Page" scope, for example.) 4) The thing that killed me dead was the inability for FireFox to dynamically load script. This may get a little confusing... My application loads "pages" by calling a XMLHTTP request and loading the content into a DIV. Multiple pages can be loaded via a rudimentary windowing manager (for example the "log in page" could appear over a search page allowing the user to log in without losing context). The new content is loaded like so (simplified): // "null" the old element to unload all script document.getElementById(ElementID).innerHTML = null; // Load the content document.getElementById(ElementID).innerHTML = NewContent; // Call the PageInit function of the new page (if one exists) if ( Page.Init ) { Page.Init(); }; This does work in FireFox - however any script in that new content does not get initialized (as far as I can tell). In IE the new script will get init'd IF the old script is unloaded first by nulling the container. This is INSANELY useful to my app - each displayable page defines a "Page.Init()" function which sets up the page. Using the code above (and the sorta-scopes like "Page") I can easily create a single page manager that loads a page and then calls a page-specific init function with no fear of stepping on other toes. In FireFox any script in the included content is just ignored - I can't even get an "alert()" to fire. This is disappointing - but not wholly unexpected - I don't believe any of this stuff is covered by any specs so it's not unlikely that different browsers will handle things differently. Still, it's a shame that such a nicely elegant technique isn't portable to FireFox. ;^) Jim Davis ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Find out how CFTicket can increase your company's customer support efficiency by 100% http://www.houseoffusion.com/banners/view.cfm?bannerid=49 Message: http://www.houseoffusion.com/lists.cfm/link=i:5:158319 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/5 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:5 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.5 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54