<!DOCTYPE> & Javacript

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

    #1

    <!DOCTYPE> & Javacript

    Hi,

    I am running into this problem with IE 6. The following two pages are
    identical except that one has <!DOCTYPE ...> at the beginning of the page
    while the other doesn't. The javascript on the page is for a page-by-page
    news scroller. IE 6 can only display the one WITHOUT the <!DOCTYPE ...>





    I know IE6 switches to 2 different modes depending on the <!DOCTYPE ..>
    header. But I can't figure out which part in the javascript isn't
    compatible with the brower's standard mode.

    It will be great if someone can take a look of the code and point out what
    is wrong. Thanks in advance!

    Terry
  • Randy Webb

    #2
    Re: &lt;!DOCTYPE&gt ; &amp; Javacript

    Terry wrote:[color=blue]
    > Hi,
    >
    > I am running into this problem with IE 6. The following two pages are
    > identical except that one has <!DOCTYPE ...> at the beginning of the page
    > while the other doesn't. The javascript on the page is for a page-by-page
    > news scroller. IE 6 can only display the one WITHOUT the <!DOCTYPE ...>
    >
    > http://free.hostdepartment.com/j/jav...th_doctype.htm[/color]

    URL:
    http://validator.w3.org/check?uri=ht...th_doctype.htm
    />

    watch for line wrap.

    One should attempt to debug X/HTML code before tackling the javascript
    code. That may or may not be your problem, but its a start.


    --
    Randy
    Chance Favors The Prepared Mind

    Comment

    • David Dorward

      #3
      Re: &lt;!DOCTYPE&gt ; &amp; Javacript

      Terry wrote:[color=blue]
      > http://free.hostdepartment.com/j/jav...th_doctype.htm[/color]
      [color=blue]
      > I know IE6 switches to 2 different modes depending on the <!DOCTYPE ..>
      > header. But I can't figure out which part in the javascript isn't
      > compatible with the brower's standard mode.[/color]

      Possibly among other things - but in CSS units are required for non-zero
      lengths. width: 34; isn't acceptable (although width: 34em; is). Its also
      cursor: pointer, not cursor: hand.

      --
      David Dorward <http://dorward.me.uk/>

      Comment

      • DU

        #4
        Re: &lt;!DOCTYPE&gt ; &amp; Javacript

        Terry wrote:[color=blue]
        > Hi,
        >
        > I am running into this problem with IE 6. The following two pages are
        > identical except that one has <!DOCTYPE ...> at the beginning of the page
        > while the other doesn't. The javascript on the page is for a page-by-page
        > news scroller. IE 6 can only display the one WITHOUT the <!DOCTYPE ...>
        >
        > http://free.hostdepartment.com/j/jav...th_doctype.htm
        >
        > http://free.hostdepartment.com/j/jav...ut_doctype.htm
        >
        > I know IE6 switches to 2 different modes depending on the <!DOCTYPE ..>
        > header. But I can't figure out which part in the javascript isn't
        > compatible with the brower's standard mode.
        >
        > It will be great if someone can take a look of the code and point out what
        > is wrong. Thanks in advance!
        >
        > Terry[/color]


        Everything was explained many months ago in this file:

        http://msdn.microsoft.com/library/de...hancements.asp

        The W3C CSS1 box model is supported the way it should be when the
        document triggers standards compliant rendering mode.

        DU

        Comment

        • Jonny

          #5
          Re: &lt;!DOCTYPE&gt ; &amp; Javacript

          Terry <NoSpam@NoSpam. con> wrote in message news:<MPG.1a79d ab3735c58b79896 94@news.tc.umn. edu>...[color=blue]
          > Hi,
          >
          > I am running into this problem with IE 6. The following two pages are
          > identical except that one has <!DOCTYPE ...> at the beginning of the page
          > while the other doesn't. The javascript on the page is for a page-by-page
          > news scroller. IE 6 can only display the one WITHOUT the <!DOCTYPE ...>
          >
          > http://free.hostdepartment.com/j/jav...th_doctype.htm
          >
          > http://free.hostdepartment.com/j/jav...ut_doctype.htm
          >
          > I know IE6 switches to 2 different modes depending on the <!DOCTYPE ..>
          > header. But I can't figure out which part in the javascript isn't
          > compatible with the brower's standard mode.
          >
          > It will be great if someone can take a look of the code and point out what
          > is wrong. Thanks in advance!
          >
          > Terry[/color]

          It would appear that XHTML 1.0 transitional is not transitional
          enough. I haven't got much time - work in half an hour but enclosing
          your script in <!-- //--> and adding \ to your </div>'s = <\/div> got
          it working but everything's squashed into top-left corner!

          Comment

          Working...