XHTML, <script>, Opera

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Albert Wagner

    XHTML, <script>, Opera


    Opera 7 doesn't appear to support the <script> element in XHTML. Does
    this mean that it impossible to use Javascript with XHTML? Or is there
    a workaround, such as the legacy method, in HTML, of commenting out the
    Javascript code.

    --
    Then there was the man who drowned crossing a stream with an average
    depth of six inches.
    -- W. I. E. Gates
  • Martin Honnen

    #2
    Re: XHTML, &lt;script&g t;, Opera



    Albert Wagner wrote:
    [color=blue]
    > Opera 7 doesn't appear to support the <script> element in XHTML. Does
    > this mean that it impossible to use Javascript with XHTML? Or is there
    > a workaround, such as the legacy method, in HTML, of commenting out the
    > Javascript code.[/color]

    No, if you serve XHTML as an XML document type like text/xml or with the
    XHTML document type application/xhtml+xml then Opera 7 doesn't support
    the <script> element. At least this has been the case last time I tested
    and I checked the Opera docs (they had that clearly documented).
    Of course you can send XHTML 1.0 as text/html and then script works. Or
    better stick with HTML 4.01, current user agents don't deal with XHTML
    in any way encouraging a change.
    --

    Martin Honnen


    Comment

    Working...