Update on cfTimeline Bug

Posted By : todd sharp Posted At : April 4, 2007 12:44 PM Posted In: cfTimeline, ColdFusion

16

I've tracked down the culprit in the issue of incorporating my cfTimeline tag into Blog CFC. It appears that Ray's layout tag uses the following doctype declaration:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

Which causes the timeline to not render. If I remove it the timeline renders fine. Unfortunately removing it also seems to make the CSS get all goofy too.

So I'm showing my ignorance here. Other then validation what does a doctype declaration do?

Related Blog Entries

Comments (16)

Jim Priest's Gravatar This is a great read on DOCTYPE:

http://alistapart.com/stories/doctype/

In a nutshell the DOCTYPE tells your browser how to render the content of the page.

todd sharp's Gravatar So why would that interfere the rendering of my timeline?

Jim Priest's Gravatar I have no idea :)

But I'd try to switch it from strict to transitional and see if its worse or better.

It's weird but the samples on the SIMILE page don't use DOCTYPE at all - nor do any of the other examples I could turn up...

Rob Wilkerson's Gravatar What tags are used by the rendered timeline? XHTML strict reduces what is valid and can money with others.

todd sharp's Gravatar Transitional/Loose...nothing works. :(

Rob Wilkerson's Gravatar What does the rendered timeline look like? Can you post some code? It may not be XHTML compliant. Try a basic HTML doctype.

todd sharp's Gravatar Rob:

Check this: http://cfsilence.com/blog/client/cfTimeline/test.c...

Just JavaScript and a div.

todd sharp's Gravatar Here's a version that doesn't render: http://cfsilence.com/blog/client/cfTimeline/testba...

Ken Auenson's Gravatar Todd:
What looks like just a single div actually gets rendered to a lot more...
The javascript creates a lot more divs...
you can see the real result of that sample here: http://auenson.com/random/test.cfm.txt
I don't know why buy my webserver actually tries to display that as html instead of serving it as a file... anyway, you can see that it is actually a LOT of divs... not sure what exactly is causing the rendering issue, though.

Steve's Gravatar Todd,

The DOCTYPE is not required by BlogCFC. I just redownloaded the source files and Ray is using <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">;. Did you change it as part of your new design?

Sean Corfield's Gravatar DOCTYPE can switch browsers in and out of "quirks" mode which changes rendering behavior in various ways.

Bryan's Gravatar Is the timeline js creating another set of head and body tags? I ask because the working test you posted doesn't show a head or body tag set when you view source. But, if you use the FF web developer extension and select "view generated source" there are head and body tag sets.

todd sharp's Gravatar Sorry I didn't get back to you guys last week - was sick as hell :(

So here's an update - i tweaked the test page a bit and it validates as xthml strict 1.0 - but - it looks like shit still.

http://cfsilence.com/blog/client/cfTimeline/test.c...

So if it's valid, why won't the damn thing render properly!!! argggg!

PS - removing the doctype declaration still does make it render properly. But I simply can't tell users of the tag not to use a doctype declaration! :(

todd sharp's Gravatar Oh yeah - Steve - I pasted the wrong DOCTYPE above - my blog is Transitional/Loose. I was also testing this in Litehouse Pro so thats what i must have used in my posting above.

Jim Priest's Gravatar Is there any support from the developer? Every example I found of this timeline on the web doesn't use a doctype... very odd.

Jim

todd sharp's Gravatar Thats my next step Jim. I find it odd too - especially since it was developed at/by MIT.