I'm encountering quite a weird problem with Safari 2.0.4 - 'new Element' doesn't work at all, *unless* you change the file extension of the document you're loading from xhtml to html. Try rendering the code below using the different extensions: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/ TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <script type="text/javascript" src="http://www.prototypejs.org/ assets/2007/10/16/prototype.js"></script> <script type="text/javascript"> // <![CDATA[ function loadme() { var newelem = new Element('div'); newelem.update("It worked."); $(document.body).insert(newelem) } Element.observe(window, 'load', loadme) // ]]> </script> </head> <body> </body> </html>
Does anyone know what the problem is? It seems a fairly fundamental issue with Safari & Prototype. Alex --~--~---------~--~----~------------~-------~--~----~ 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 [email protected] 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 -~----------~----~----~----~------~----~------~--~---
