![]() ![]() A Mini Case Study: GlossariesBy Susan IvesI had a client who wanted an elegant way of providing definitions for medical terms on their site. This mini case study will not only introduce you to the design process but also give you fresh ideas that you can apply to your own site.
Link to a glossary page: In text: <A HREF="glossary.html#hardword">hard word</A>Here is an example of some words defined in Ambrose Bierce's Devil's Dictionary: Halo and Half and Harbor. The pros: This is easy to maintain - you just need one glossary, and changes are easy. The glossary can be used for multiple definitions, multiple pages and even multiple sites. The name-target code is unadorned HTML and will work in every browser. The cons: Going to another page breaks the reading flow. Some inexperienced Web surfers may not understand how to get back to their original place in the text. Frames: Using frames, or multiple HTML files displayed on the same screen, a glossary could be included on the same page as the article. I'm not usually a fan of frames, but this seems to be a sensible implementation of the technique. The same name-target convention described above would be used to include the entire glossary in the frame (although a huge glossary might need to be broken down into smaller files to load more quckly.) You can see an example of a framed article and glossary here. The pros: The definition shows up on the same screen as the defined word, not breaking the reading flow. You are working with one dictionary document - easy to create and maintain. You can use full HTML in the frame, including a graphics and links. The same format can be re-used for multiple pages. The cons: Some people get confused by frames, although this is a fairly straightforward implementation. The dictionary takes up quite a bit of screen real estate.
Tool tip: The pros: The definition is contextual - it shows up right where the word does and the reading flow isn't interrupted. It is moderately easy to maintain. It is straight HTML and will work in all browsers. The cons: Each tip needs to be coded for each instance of the word. The tooltip box only stay open for about five seconds -not long enough to read a long definition. Many people will be confused by an underlined word that looks like a link, smells like a link but is really a definition. You can't use HTML within the tip - no line breaks, bold, etc. - which makes the text dense to read.Dynamic HTML Tooltip: DHMTL is a generic name for client-side scripting, often JavaScript. You can see examples of DHTML tooltips at www.dyn-web.com/dhtml/tooltip.html and www.help4web.net/webmaster/DHTML_Tooltip_Generator.html. The second example includes a generator that creates custom code for you. The pros: The definition is contextual - it shows up right where the word does and the reading flow isn't interrupted. The tooltip can contain custom colors and graphics. The cons: The coding is a nightmare, although using a page template would ease the burden. DHTML will not work will older browsers, or for those who turn their scripting off. Some of the DHTML tooltips require exact sizing, which means the box must be as big as the longest definition.Popup Window: We discussed the code for popup windows at length in the October, 2003 Lazy Webmaster. A link to a word activates a mini-screen containing the definition. Here is a popup window to the word halo from the Devil's Dictionary. The pros: The definition shows up on the same screen as the defined word, not breaking the reading flow. Once a definition popup is created it can be used for multiple instances of the hard word. You can use full HTML in the popup, including a graphic. It is moderately easy to create and maintain. The cons: Popups use JavaScript, and some people might disable Java in their browsers. Many people get confused by popup windows. Each definition has to be coded in a separate HTML document.
Susan Ives is a former president of Alamo PC. She archives these columns on her Web site, www.susanives.com/lazy. If you visit, you can cut-and-paste the code instead of retyping it from the magazine - the ultimate in lazy Webmastering! ![]() |