On Nov 6, 5:42 pm, Alex MacCaw <[EMAIL PROTECTED]> wrote:
> 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.
It seems that Safari uses the file extension rather than the DOCTYPE
declaration. If you serve your file to Safari as XHTML, I suspect you
will get the same result.
Safari does not appear to support the (non-standard) innerHTML
property for dynamically created elements in XML documents. If you
try something like:
alert(typeof newelem.innerHTML)
you will get 'undefined', whereas 'string' would be expected if the
innerHTML property was supported (and that is the result for an HTML
document).
[...]
> Does anyone know what the problem is? It seems a fairly fundamental
> issue with Safari & Prototype.
Yes, it does, since Prototype is very dependent on innerHTML. But
then again, using XHTML on the web is pretty much a complete waste of
time.
Incidentally, your document is not a valid XHTML document anyway, so
strictly, if served as application/XML, the result should be an error
message .
--
Rob
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---