By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,384 Members | 1,886 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,384 IT Pros & Developers. It's quick & easy.

XHTML, <script>, Opera

P: n/a

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
Jul 20 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a


Albert Wagner wrote:
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.


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
http://JavaScript.FAQTs.com/

Jul 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.