PDA

View Full Version : Why does adding DOCTYPE break several scripts?



msmedley
11-15-2007, 12:46 AM
1) Script Title:
multiple scripts

2) Script URL (on DD):
multiple script URLs

3) Describe problem:
I have been trying out several script here today, yet some of them seem to break when I try them with a DOCTYPE specified.

Stripping my DOCTYPE from my code isn't an option, so how can I modify these scripts to work with a DOCTYPE specified?

ricmetal
11-15-2007, 01:37 AM
hey

im not sure about what u mean by "breaks" but i hope this helps

http://www.dynamicdrive.com/forums/showthread.php?t=26614

jscheuer1
11-15-2007, 05:14 AM
Some of the scripts in the DD library are old, and/or written without regard to DOCTYPE or standards mode.

Most can be updated though, usually all that is required is to add a few:

+'px'

at the end of lines setting height/width/top/left style values, and (for IE) using some sort of test to determine compatibility mode for document.documentElement vs. document.body.

Without a specific script though, I cannot be much more detailed. I have updated many of these scripts in the past for others however, so a search of the forum archives might find an update for any given script.

msmedley
11-15-2007, 03:27 PM
Some of the scripts in the DD library are old, and/or written without regard to DOCTYPE or standards mode.

Most can be updated though, usually all that is required is to add a few:

+'px'

at the end of lines setting height/width/top/left style values, and (for IE) using some sort of test to determine compatibility mode for document.documentElement vs. document.body.

Without a specific script though, I cannot be much more detailed. I have updated many of these scripts in the past for others however, so a search of the forum archives might find an update for any given script.
As I get specific scripts, I'll list them in this thread. I went through soooooo many yesterday, that I can't remember.

In addition to adding "px" to height/width/top/left I found adding "#" in front of hex color values helps too.

jscheuer1
11-15-2007, 03:59 PM
As I get specific scripts, I'll list them in this thread. I went through soooooo many yesterday, that I can't remember.

In addition to adding "px" to height/width/top/left I found adding "#" in front of hex color values helps too.

The scripts without the # prefix for hex color values are the really old ones. :)

Generally, if I have made an update available in these forums for a particular script, it can be found by using Google, here is the search string to use:

site:dynamicdrive.com/forums/archive script name or keywords jscheuer1

Just replace the red part with the script name or with keywords that should locate it.