w3 Stopping JavaScript?

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

    w3 Stopping JavaScript?

    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


  • David Dorward

    #2
    Re: w3 Stopping JavaScript?

    Paul wrote:
    [color=blue]
    > Why does the following line in my HTML:[/color]
    [color=blue]
    > <!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?[/color]

    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/

    Comment

    • Hywel Jenkins

      #3
      Re: w3 Stopping JavaScript?

      In article <bmtmvf$3hc$1@w isteria.csv.war wick.ac.uk>,
      please@dontemai lmedirectly.com says...[color=blue]
      > 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?[/color]

      It doesn't.

      [color=blue]
      > My only work-around at the minute is to just not include the above two
      > lines[/color]

      That's one line.

      [color=blue]
      > what should I be doing?[/color]

      Posting a URL so we can see your code.


      --
      Hywel I do not eat quiche


      Comment

      • Keith Bowes

        #4
        Re: w3 Stopping JavaScript?

        Paul wrote:[color=blue]
        > 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?
        >[/color]

        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.docume ntElement.


        Comment

        Working...