<!DOCTYPE> & Javacript  
Author Message
Terry





PostPosted: 2004-1-23 3:04:27 Top

javascript, <!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 ...>

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
 
Randy Webb





PostPosted: 2004-1-23 7:15:00 Top

javascript >> <!DOCTYPE> & Javacript Terry wrote:
> 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%3A%2F%2Ffree.hostdepartment.com%2Fj%2Fjavashop%2Fwith_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

 
David Dorward





PostPosted: 2004-1-23 7:34:00 Top

javascript >> <!DOCTYPE> & Javacript Terry wrote:
> http://free.hostdepartment.com/j/javashop/with_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.

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/>
 
 
DU





PostPosted: 2004-1-23 10:43:00 Top

javascript >> <!DOCTYPE> & Javacript Terry wrote:
> 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
 
 
jonny_xyz_75





PostPosted: 2004-1-23 15:57:00 Top

javascript >> <!DOCTYPE> & Javacript Terry <email***@***.com> wrote in message news:<email***@***.com>...
> 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!