We've found that having multile copies of the Prototype.js file on a single page will cause IE6 and IE7 to throw JS errors - most notably when using methods on elements that have been extended. For example, take this quick test harness:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http:// www.w3.org/TR/html4/loose.dtd"> <html> <head> <script type="text/javascript" src="prototype.js"></script> <script type="text/javascript"> window.onload = function() { alert( $('wibble').getElementsByClassName ); } </script> </head> <body> <div id="wibble"> <p>Some text...</p> </div> </body> </html> It works fine in Opera 9.26, Safari 3.1.1, IE 6, IE 7, and Fx 2.0.0.14. If you duplicate the script include line for Protoype so that 2 copies of the file are loaded, then you see "undefined" in IE6 and IE7, while all other browsers behave as I would expect. Unfortunately, this is an issue for us as we're using a 3rd-party widget on our page which delivers v1.6.0.2 of Prototype after our page delivers the same version, and we have no control over what is loaded from the remote servers. Is there any way that Prototype can be modifed to detect itself, and gracefully do nothing if it's already on the page? Alternatively, given we're using the same version of Prototype as our widget, is there any way of somehow "disabling" theirs before it is loaded (so that when it is loaded, it does nothing, falling back on our version)? Thanks! Dan --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---