• Resolved Ajay

    (@ajay)


    I noticed a problem when serving the blog as application/xhtml.

    I released the Transpose Email plugin which uses a javascript function Transpose_Email().
    Works properly in IE and Opera
    This works perfect in Firefox when the page is served as text/html, but the moment I shift to application/xhtml, I get a javascript error saying function not found.

    I have absolutely no idea how to solve this problem so that the function works when the page is served as XHTML.

    Any suggestions?

Viewing 2 replies - 1 through 2 (of 2 total)
  • You should keep the JavaScript as an external script and just link to it from the XHTML document. You can’t have ‘inline’ JavaScript like that in an XML document (as a real XHTML document is). The only option is to escape it properly (read up on CDATA), but keeping scripts and CSS external is the best.

    Thread Starter Ajay

    (@ajay)

    Thanks for the post.
    Was able to fix the problem when I got the same feedback from MozillaZine Forum.

    Moved the js to an external file.

    Released v1.1 of the plugin 🙂

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘JavaScript, Firefox and application/xhtml’ is closed to new replies.