<!DOCTYPE> & Javacript

T

Terry

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/javashop/with_doctype.htm

http://free.hostdepartment.com/j/javashop/without_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
 
R

Randy Webb

Terry said:
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/javashop/with_doctype.htm

URL:
http://validator.w3.org/check?uri=http://free.hostdepartment.com/j/javashop/with_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.
 
D

David Dorward

Terry said:
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.

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.
 
D

DU

Terry said:
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/javashop/with_doctype.htm

http://free.hostdepartment.com/j/javashop/without_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


Everything was explained many months ago in this file:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnie60/html/cssenhancements.asp

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

DU
 
J

Jonny

Terry said:
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/javashop/with_doctype.htm

http://free.hostdepartment.com/j/javashop/without_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

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!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top