473,671 Members | 2,504 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Determine if the www-reader is in quirk mode?

Is it possible to determine if the www-reader is in quirk mode and
then do a printout on the status line at the bottom?
Jul 26 '05 #1
5 2322
Roland Bengtsson wrote:
Is it possible to determine if the www-reader is in quirk mode and
then do a printout on the status line at the bottom?

why not just use a strict doctype to make sure it doesnt happen in the
first place?
Jul 26 '05 #2
So the doctype is the only condition the www-reader look at when it
determine what mode it will go in?

For example is this an doctype that is OK?

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

It validates ok on W3C for HTML V4.0.
But the page info in Firefox shows that this www-page is in quirk mode.
So it should be something wrong with the doctype or the rest of the
page. I don't know.

Look for yourself at www.cplusplus.nu.
The language is Swedish, but it doesn't matter for the html code.

Regards Roland
*** Sent via Developersdex http://www.developersdex.com ***
Jul 26 '05 #3
Roland Bengtsson wrote:
So the doctype is the only condition the www-reader look at when it
determine what mode it will go in?

For example is this an doctype that is OK?

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

It validates ok on W3C for HTML V4.0.
But the page info in Firefox shows that this www-page is in quirk mode.
So it should be something wrong with the doctype or the rest of the
page. I don't know.

Look for yourself at www.cplusplus.nu.
The language is Swedish, but it doesn't matter for the html code.

Regards Roland
*** Sent via Developersdex http://www.developersdex.com ***


This doesn't trigger standards mode in IE, you would need:

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

that can all be on one line too (with a space of course)

http://msdn.microsoft.com/workshop/a...ts/doctype.asp

Kevin N.

Jul 26 '05 #4


Roland Bengtsson wrote:
Is it possible to determine if the www-reader is in quirk mode and
then do a printout on the status line at the bottom?


IE 6 and Mozilla and Opera have a property
document.compat Mode
which has the value 'BackCompat' when in quirks mode.

--

Martin Honnen
http://JavaScript.FAQTs.com/
Jul 27 '05 #5
Martin Honnen <ma*******@yaho o.de> writes:
IE 6 and Mozilla and Opera have a property
document.compat Mode
which has the value 'BackCompat' when in quirks mode.


It has the value "CSS1Compat " in standards mode, but different
browsers have different values for quirks mode.

IE and current Firefox have "BackCompat ", but Opera uses "QuirksMode ",
and I seem to remember previous versions of Mozilla doing the same.

So, to test for standards/non-standards mode, compare to "CSS1Compat ".

/L
--
Lasse Reichstein Nielsen - lr*@hotpop.com
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleD OM.html>
'Faith without judgement merely degrades the spirit divine.'
Jul 27 '05 #6

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

Similar topics

17
6135
by: John Bentley | last post by:
John Bentley: INTRO The phrase "decimal number" within a programming context is ambiguous. It could refer to the decimal datatype or the related but separate concept of a generic decimal number. "Decimal Number" sometimes serves to distinguish Base 10 numbers, eg "15", from Base 2 numbers, Eg "1111". At other times "Decimal Number" serves to differentiate a number from an integer. For the rest of this post I shall only use either...
3
2581
by: Shahid Juma | last post by:
Hello All, This may be a trivial question, but I was wondering how can you determine if a value contains an Integer or Float. I know there is a function called IsNumeric, however you can't determine what type it is. Thanks for the help, Shahid
2
2121
by: LaBird | last post by:
Dear all, I'd like to know if there is any function or program call in C++ (without memory protection support by OS), that can determine whether an object is being read or written? e.g., a = b + c; // a is being written while b and c are being read a++; // a is being read and written
5
2234
by: Hennie de Nooijer | last post by:
Hi, This is a diffcult issue to explain. I hope to make my problem clear to you. SITUATION I'm building A SLA Query for a customer. This customer has an awkward way to determine the SLA results ;-) Depending on a category which is stored in a headertable (Requests) a field and logic is determined how to get a proper Close_Date. This Close_date can be the closedate of the request. It is also possible that the close_date is a certain...
5
1853
by: George Hester | last post by:
Say I have this in a web page: <center><a href="http://www.microsoft.com">www.microsoft.com</a></center> I can use CSS, the DOM and\or JavaScript to determine the width style.innerHTML.length of the www.micosoft.com. But how can I tell in pixels how far it is from the left side of the client area using JavaScript? If the browser is resized and the text wraps the distance will change. So I need to determine it dynamically. Thanks. --...
3
5305
by: lucpustjens | last post by:
Hello, I want te determine the client operating system, because I need to kno the default cookie directory. If there is a way to determine the cooki directory directly, than it is also good. the used OS te determine are: win 95, win 98, win ME, win XP, win NT Thanks for help,
4
1815
by: anketm | last post by:
I am writing a simple client using UDP sockets. I am wondering if there is any way to determine what local port a socket was bound to when bind() is not explicitly called. This is what my program looks like: sock = socket(PF_INET, SOCK_DGRAM, 0); sendto(sock, message, strlen(message) + 1, 0, (struct sockaddr *) &server, sizeof(server));
3
11574
by: Developer in California | last post by:
I am working on developing a generic Web framework using Master Pages in ASP.NET 2.0. What I have done is created a PageRenderer class which has a public method which will retrieve the path of the content I want to execute based on the name of the asp:Content control. As shown in the code snippet below, to get the content I want to display, I call the GetContentPagePath public method in PageRenderer passing a string duplicating the value...
6
14345
by: Jana | last post by:
Greetings Access Gurus! I am working on an app to send batch transactions to our bank, and the bank requires that we place an effective date on our files that is 'one business day in the future, excluding holidays and weekends.' I didn't want to build a table of holidays that would have to be continuously updated, so I searched high and low for a function that would tell me whether a given date was a holiday, to no avail. I did find an...
9
1909
by: Scott | last post by:
What is the most reliable method to determine the folder a script is running in? I was looking at the globals in $_SERVER but all the variables also listed the actual file the script was running in. Thanks Scotty
0
8483
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
8402
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,...
1
8605
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7445
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
6237
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
5703
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();...
0
4416
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2819
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
2
2062
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.