473,839 Members | 1,423 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2729
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**********@y ahoo.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>Tanzan ia 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**********@y ahoo.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
7120
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 property. This works for IE6 but Opera7.54 and Netscape7.1 add large line spacing between the text blocks and any lines of wrapped text. The line spacing is independant of the font size and is consistent between all lines. ie: it's not larger...
15
1990
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 like to know how to invoid this without having to include a CSS for every browser. Here's a link to the page http://www.myexersize.com/biography/
7
1671
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 simple, but it's not working. I've cooked down my output code to show you what I mean. If you run the code below, there's no line under the link, but if you either remove the
6
1929
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 researched a bit and read about a hack but for some reason I've been unable to get it to work. Perhaps I've missed some subtle requirement like placed it in the wrong place in my css file. If you view the page with Opera or Firefox, you'll notice...
7
1873
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 the first column get's word wrapped, but the description text in the second column doesn't, the next row get's wrapped to sit next second line of the link name. Also if a two line link name is last in the category box, it'll cross the outside of...
9
1417
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. IIRC, also, before the code is executed, the target area created by <div ID="BarCht" style="position:relative; width:360; height:340; background:silver; text-align:center;"> does not appear.
2
2189
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 file(newsscroller.js) in my ASP page, everything works great in a normal HTML page, I can see the scroller just fine, but in an ASP page it just does not show, I get some error message that the control has not been initialize, so far I've been...
0
3217
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 very strange problem. With 2nd line of code (DOCTYPE), I can popup modal dialog in middle of screen, BUT all my styles are lost, including modal popup is ugly. If I remove DOCTYPE I can see all my styles, BUT modal
6
3320
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 in red and deletions in red strike though. There seem to be several in Perl and Python and many diff programs which all seem to be line based and work on text written in PHP.
0
9855
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9697
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10908
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10586
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10293
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9426
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7828
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7017
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4484
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.