Hi Guys, I think IE is having problems recognizing when the dom is fully loaded and calling my init function before all of the elements all are the page. My code works great in Firefox but IE throws an error at this line var tabAnchors = $(navTabs).select('li a'); saying "Error: 'null' is null or not an object". However, if I put an alert call before that line, IE works fine. Is there a better way to check for dom load in IE? Sample code below.
var NavSwitcher = { init: function(navTabs, gumballHolder) { //alert(''); var tabAnchors = $(navTabs).select('li a'); tabAnchors.each(function(a) { a.observe('click', function(e) { e.stop(); var tabName = a.readAttribute('href'); NavSwitcher.activateTab(tabAnchors, tabName); }); }); NavSwitcher.activateScroller($(gumballHolder)); }, ..... } function video_hub_init() { NavSwitcher.init('shows_list', 'vid_list_holder' ); // bypass the EOLAS patent lawsuit objects = document.getElementsByTagName("embed"); for (var i = 0; i < objects.length; i++) { objects[i].outerHTML = objects[i].outerHTML; } } document.observe("dom:loaded", video_hub_init); --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---