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

w3 Stopping JavaScript?

P: n/a
Why does the following line in my HTML:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

Stop all my JavaScript running in my webpage?

My only work-around at the minute is to just not include the above two
lines, what should I be doing?

Thanks,

Paul
Jul 20 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Paul wrote:
Why does the following line in my HTML: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

Stop all my JavaScript running in my webpage?


The above Doctype triggers Standards mode (as opposed to
Emulation-Of-Our-Previous-Stupid-Mistakes[1] mode) in many browsers.

Most likely you are doing something like altering the style of something,
and not providing units for lengths (they are required unless the length is
zero).

[1] AKA Quirks mode

--
David Dorward http://dorward.me.uk/
Jul 20 '05 #2

P: n/a
In article <bm**********@wisteria.csv.warwick.ac.uk>,
pl****@dontemailmedirectly.com says...
Why does the following line in my HTML:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

Stop all my JavaScript running in my webpage?
It doesn't.

My only work-around at the minute is to just not include the above two
lines
That's one line.

what should I be doing?


Posting a URL so we can see your code.
--
Hywel I do not eat quiche
http://hyweljenkins.co.uk/
http://hyweljenkins.co.uk/mfaq.php
Jul 20 '05 #3

P: n/a
Paul wrote:
Why does the following line in my HTML:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

Stop all my JavaScript running in my webpage?

My only work-around at the minute is to just not include the above two
lines, what should I be doing?


Knowing the browser that you're using and the URL that displays the
problem will greatly help. My guess is that you're using IE (poor guy)
and the problem is either what David said or that you're trying to
access a property such as scrollTop through document.body instead of
document.documentElement.
Jul 20 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.