Doctypes and EZmenu

This will only affect web page designers who use the <!DOCTYPE...> specification on their webpages.

What are Doctypes?

Modern browsers have two modes of operation - "loose" mode and "strict" mode. Each mode renders DHTML elements slightly differently. By default, the browsers will work in the loose mode unless it is instructed by the webpage to switch to the strict mode. This is achieved by specifying a strict doctype on the first line of the webpage. The first line of the page would then read something like <!DOCTYPE .....> instead of <HTML>. If no doctype is specified, the browser would operate in the default loose mode. (All the EZmenu examples in the download operate in the loose mode.)

Examples of doctype definitions:

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

Loose Doctype
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 transitional//EN">

How does Doctype Definition affect EZmenu?

By default, EZmenu renders the menus in the loose mode. Therefore if you do not use doctypes or you specify a loose doctype, then there is nothing else that you need to do. However if you specify a strict doctype on your webpages, then you need to tell EZmenu to render the menus in the strict mode. This is done by using a text editor to open the file ezloader.js (located in the "code/" subdirectory) and changing the FIRST line to:

var ez_strictHTML=1;

If you decide to use loose doc types later on, just revert the first line back to

var ez_strictHTML=0;

That's all you need to do.