spacer

Webref WebRef   Sitemap · Experts · Tools · Services · Newsletters · About i.com

home / web / dev / menus / stable

Feature Highlights: Stability

Developer News
OpenOffice 3.2 Lands Amid Critical Changes
Red Hat, IBM Firmly in KVM Virtualization Camp
Red Hat Talks Up Open Source Cloud Plans

Universal Related Popup Menus

We set a number of goals when designing these menus. Being a commercial site we wanted stability and universality. Being a webmaster obsessed by file size I wanted compact, fast-loading code that was generic. With the URPM we achieved all of these goals.

Stability

Long-time view sourcers will recall that the previous incarnation of the related menus had some peculiarities when the screen was resized. For pages with dynamically generated HTML using the document.write('') command, resizing the page caused two things:

    wysiwyg://3/http://www.webreference.com
    code overwrite

The "wysiwyg" is actually Netscape using the cache to redisplay the page. This is merely annoying. The second problem (perhaps related) is more serious. When we did a view source on the cached wysiwyg page we found that it was corrupted. When this cache rewrite occurred we sometimes found that the end of our static HTML was overwritten by our dynamic HTML. This usually happened when the menus were towards the end of the document. We tried a number of fixes, including sacrificial tables (I called them prophylactic tables), adding document.open() and .close(), dummy single-line scripts, but nothing would rid us of the dreaded wysiwyg. Netscape claims that version 4 fixed the "wysiwyg" resize bug.

The only solution was to avoid the problem entirely and write out the initial menus with static HTML. This solved the stability problem but introduced another. Static HTML is... well... static. You can't dynamically generate browser-specific code with static HTML, so we were stuck with a JavaScript/no JavaScript mode, although we could use frames, a CGI, or a special HEAD tag to redirect to browser-optimized pages.

Explorer 3 and ActiveX

By choosing to generate our initial menus with static HTML, we were precluded from dynamically writing ActiveX menus. ActiveX is the only way to relate menus in Explorer 3, as JScript 1.1 does not support the "new Option" command. We decided to go with stability, and Explorer 3 users get non-related live popups, while the majority of users with modern browsers see related popups when they visit. More about ActiveX later.

Comments are welcome


The Network for Technology Professionals

Search:

About Internet.com

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | E-mail Offers

webref The latest from WebReference.com Browse >
Search Engine Optimization: Selecting and Embedding Keywords · Are Google's Language Translation Web Services Ready for Prime Time? · Installing and Using Meeplace, the Business Review CMS
Sitemap · Experts · Tools · Services · Email a Colleague · Contact FREE Newsletters 
 The latest from internet.com
IBM DB2 10 for z/OS: Justifying the Upgrade · Living La Vida Colo: Choosing the Right Colocation Facility · FTC Concerns over Social Media Privacy Linger

 



Created: Mar. 9, 1997
Revised: Feb. 12, 1999

URL: http://webreference.com/dev/menus/stable.html