Building the Imperfect Beast: Part 2 (popups.html)
January 19, 1999
Now we begin to walk through the code which comprises popups.html. As we walk through each block of code
in sequence the logic of this file should become clear.
Creating the window title
<!-- Pop up menu contents ... custom coded for Insure.com -->
<!-- Design and implementation: Aaron Weiss (aaron@pobox.com)
December 1998-->
<html><head>
<script language="JavaScript1.2">
document.write("<title>Select a story");
for (j=0;j<75;j++){document.write(" ")}
document.write("</title>");
</script>
|
When the browser spawns a new window that window's title
always appears with either "Netscape" or
"Internet Explorer" appended to it, the browser's
way of branding itself. The client does not like this.
So, the code begins by using
JavaScript to write an on-the-fly
<title> tag for the page which cleverly inserts
75 spaces after the text, thereby pushing the browser
brand off the titlebar. Inelegant, to say the least, but
our only choice.
Building the Imperfect Beast: Part 1 (menus.js)
DHTML Pop-Up Menus: A Parable of Triumph and Loss (Based on a True Story)
Defining a stylesheet for the menus
|