473,388 Members | 1,342 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

Problem with DOCTYPE line

I have a hand-crafted set of HTML files. each file begins with the line:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

while the master index.html file specifies:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"
"http://www.w3.org/TR/html4/frameset.dtd">

The index.html file defines three frames in two nested framesets and
loads separate html documents into these three frames. However, when
the document is loaded into Firefox 1.5.0.7, it displays fine but the
mozilla/firefox loading icon in the upper-right corner just keeps running
and never stops until a different page is loaded. It will not stop even if
the STOP button is pressed. I can separately load the html documents that
go into each frame and there is no problem but when I load the master file
that defines the frames this problem always occurs. I sliced and diced the
content of that file looking for the problem and finally discovered that if
I changed the DOCTYPE line to simply:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN">

Then it loads without a hitch and firefox stops after everything is
displayed.

I'm sure that the problem is elsewhere, but I cannot find any unbalanced
tags, open quotes or anything similar. Does anyone have a clue as to what
is actually happening and where I should look for the real source of the
problem.

Thanks,
--
Jeff
Oct 13 '06 #1
7 2698
VK

Jeffery Small wrote:
I'm sure that the problem is elsewhere
That's a very good guess :-) because DOCTYPE is treated as opaque
string to choose quirk vs. standard mode, that is all of it.
Does anyone have a clue as to what
is actually happening and where I should look for the real source of the
problem.
In one of your frames you are using document.write statements and not
closing output stream with document.close() - so Firefox keeps the
output stream open for more data (this is why the logo stays in the
"loading" state).

Change
document.write(first);
...
document.write(last);

to:

document.write(first);
...
document.write(last);
document.close();

Oct 15 '06 #2
"VK" <sc**********@yahoo.comwrites:
>In one of your frames you are using document.write statements and not
closing output stream with document.close() - so Firefox keeps the
output stream open for more data (this is why the logo stays in the
"loading" state).
>Change
document.write(first);
...
document.write(last);
>to:
document.write(first);
...
document.write(last);
document.close();
VK:

Thanks for the reply. However, at this point I am not even using style
sheets. However, with much additional investigation I believe I did locate
the problem. I had the following LINK entry in the HEAD section to define a
favicon for the page:

<HEAD>
<TITLE>Tanzania 2006</TITLE>
<LINK REL="shortcut icon" HREF="images/CJSA.ico">
</HEAD>

Later, I moved the images subdirectory to a different location. I updated
all of the image links except this one! Apparently, firefox doesn't know
what to do when it cannot find a favicon and it just keeps churning away.
When I fixed the path everything began working as expected.

So now my question is: Why do you think changing:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"
"http://www.w3.org/TR/html4/frameset.dtd">

to

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN">

had an effect on this situation? What does the referencing browser actually
do with the contents of the frameset.dtd file?

Thanks again for your help.

Regards,
--
Jeffery Small
Oct 15 '06 #3
VK

Jeffery Small wrote:
Thanks for the reply. However, at this point I am not even using style
sheets.
That was not about stylesheets but about javascript document.write()
method - a very common issue causing Firefox to stay in "loading" mode.
But this time evidently that was not an issue so my guess was wrong.

<snip>
So now my question is: Why do you think changing:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"
"http://www.w3.org/TR/html4/frameset.dtd">

to

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN">

had an effect on this situation? What does the referencing browser actually
do with the contents of the frameset.dtd file?
It does absolutely nothing (UA's do not load nor even check for
existence external DTD's - not in this situation).

But the presence of opaque URL string switch Firefox into strict
(CSS1Compat) mode while the second syntax leaves it in quirk
(BackCompat) mode. See the original switch rules table at:
<http://msdn.microsoft.com/library/en-us/dnie60/html/cssenhancements.asp>

How does it affect on staying in the "loading" mode for missing picture
- I have no idea.

Oct 15 '06 #4
On Sun, 15 Oct 2006 17:41:39 GMT, je**@cjsa.com (Jeffery Small) wrote:
>So now my question is: Why do you think changing:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"
"http://www.w3.org/TR/html4/frameset.dtd">

to

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN">

had an effect on this situation? What does the referencing browser actually
do with the contents of the frameset.dtd file?
It does nothing with the contents of the file. However you are probably
triggering quirks mode, as VK said. You can find more on the subject via
the usual search tools - but generally your sanity is safer if you use
standards mode, triggered by a full DOCTYPE statement.

--
Stephen Poley

http://www.xs4all.nl/~sbpoley/webmatters/
Oct 15 '06 #5
Stephen Poley & VK:

Thanks to you both for the explanation and for VK's pointer to the
document on the MS site that further explained the use of the DOCTYPE
declaration.

Regards,
--
Jeffery Small
Oct 15 '06 #6
Jeffery Small wrote:
Stephen Poley & VK:

Thanks to you both for the explanation and for VK's pointer to the
document on the MS site that further explained the use of the DOCTYPE
declaration.
Keep in mind that this MS site is only referring to the way _IE 6_
handles it.

--
Gus
Oct 15 '06 #7
"VK" <sc**********@yahoo.comwrites:
But the presence of opaque URL string
The presence of what?
switch Firefox into strict
(CSS1Compat) mode while the second syntax leaves it in quirk
(BackCompat) mode. See the original switch rules table at:
<http://msdn.microsoft.com/library/en-us/dnie60/html/cssenhancements.asp>
The 'original (as in "case of precedence") switch rules' come from IE 5
for the Mac and are not documented to the best of my knowledge (if you
happen to know better, please share).
--
||| hexadecimal EBB
o-o decimal 3771
--oOo--( )--oOo-- octal 7273
205 goodbye binary 111010111011
Oct 16 '06 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Danny | last post by:
I have a small <div> element which contains two text blocks - one within <h5> tags and the other within <p> tags. I don't want any extra line spacing between elements so use the display:inline...
15
by: seajay | last post by:
Hello, I've designed a website with using any tables, everything is postionned using css, content goes into divs. However I've noticed that the website looks different across browsers. I would...
7
by: M O J O | last post by:
Hi, I'm developing a asp.net application and ran into a strange css problem. I want all my links to have a dashed underline and when they are hovered, it must change to a solid line. Sounds...
6
by: ima | last post by:
http://www.kencoffman.com/templates.htm I've been experimenting with float:left and I've been able to clear those floats as far as Opera 8.02 and Firefox 1.0.6 but IE6 is a problem. I've...
7
by: David Findlay | last post by:
I'm trying to do a table for laying out a links page in CSS. See http://qldstorms.com/links.php. My stylesheet is at http://qldstorms.com/styles/screen.css. My problem is that if the link name in...
9
by: Dr John Stockton | last post by:
Page part <URL:http://www.merlyn.demon.co.uk/js-index.htm#BC> works in IE4 but not in IE6. IE6 says "invalid argument, apparently referring to the "var Wid" line in the javascript section below. ...
2
by: verci | last post by:
Hi guys, sorry if this seems stupid but I'm a newbie, I'm running Windows XP Pro SP2, IE 7, VS2005, ASP.net 2.0 The problem is that I'm trying to display this news scroller made in a Javascript...
0
by: =?Utf-8?B?SGFyZHkgV2FuZw==?= | last post by:
Hi all, I have a web form, and I want to use ModalPopupExtender from Ajax Toolkit. I am using IE 7.0 as browser, VS 2005 and Ajax and Ajax Tool Kit installed. Windows XP Pro. Now I have a...
6
by: Aaron Gray | last post by:
Hi, I am working on an HTML WYSISYG Wiki and need to display a diff page like WikiPedia does if two people edit a file at the same time to give the second user the diff. Basically with additions...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.