This site will look better in a browser that supports Web standards, but it is accessible to any browser or Internet device.

November 21, 2005

1993
2001
2002
2003
2004
2005
January
February
March
April
May
June
July
August
September
October
November
Su M Tu W Th F Sa
    1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30      
December
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022

Hare-Brained Ideas

The last three sites I developed were CSS-based (the one I'm currently working on, works best as tables -- I don't have the time to warp CSS to that layout). I did what I was supposed to do and left the meat of the page at the top: Only the company logo preceded the content; the navigation and other things came after.

There's a problem when things error out, though. The page looks really odd, since things like the navigation bar don't even draw (the script stops to barf before it gets that far, so the page doesn't know it's supposed to exist). Let's say my page layout is (roughly) this:

<body>
<div id="content">(Page stuff)</div>
<div id="navigation">(Links)</div>
</body>

So let's say my nav bar is at the top of the page, with a nice blue background. If as part of teh page stuff I do some server-side scripting, I may get an error message partway through:

<body>
<div id="content">ASP error '8000809a':
You suck.

Note that the page never made it to the end of the line, so my nav bar doesn't exist. When the page is styled, my blue bar is non-existant, and the page looks even worse that it would with just the error.

The solution, of course, is to not write error-inducing code. But since I'm only human that's not 100% guaranteed. I could always pull the on error resume next rabbit out of my hat, but that makes debugging a bitch: "The page didn't do anything!" "Well, what did you do?" "I forget." So of course I can't find the problem to fix it.

What would be nice would be something like the function templates (or whatever they're called) that C++ uses. That way I could "hint" to the browser that I'm going to be using some of the things I set up in the style sheet. Then if my code looked like this:

<html>
<head>
<template>
<!--
body {
#content
#navigation
}
-->
</template>
</head>
<body>
<div id="content">ASP error '8000809a':
You suck.

It wouldn't matter that the execution ended, because the page would "know" to drop the nav bar into place and at least fill in the look, even if the actual contents aren't there. The page would still be brokwn, but at least it wouldn't look half-done.

This page's URL is http://jasonfleshman.org

This page last updated Jul 19, 2019 3:34:19 PM.