Nov
09
I realize that I haven't
written anything in a rather long time. There are a few
reasons for this, the main one being the release of IE7, and
the fact that 70% of the pages of my company's online
application would not appear correctly when using it. This
wouldn't be too big of a deal if Microsoft hadn't announced
that IE7 will be part of an automatic update. Because of
this, and the fact that an actual date was never stated, our
web development team spent countless hours modifying our
code on the pages that were having problems with IE7. You
may be surprised to hear read this, but in
a way, I have been able to see this as a good thing.
A Good Thing? You Must Be Out Of Your
Mind!
Yeah, I know, spending 14 hours a day for the past 2 weeks
re-writing html pages just so they work in one browser
doesn't sound like "A Good Thing". After all, the entire
application worked fine in Firefox, Opera, IE6, etc. How
can I possibly say this is a good thing? Well, let me start
off by saying that this application was originally created
in 1998, and about 4 years later, was revamped a bit, but as
far as a focus on well formed, standards compliant html code
goes, this never surfaced as a concern for us. We created
the pages to work, with little concern about the format of
the code. So, all pages used tables for formatting, and
would have failed a validation test
miserably.
Read the rest of
this entry »
Aug
26
They've changed things up a bit over at dictionary.com.

It looks slick, clean, and more user friendly. Best of
all they are using CSS for layout. Because of this, it
seems to generate pages much quicker than before. I'll have
to give my props to the designers over at happycog.com, the ones
responsible for the new layout and redesign of dictionary.com.
Apr
05
Below is a JavaScript that will make alternating the row
colors of a table extremely simple. The beauty of it is
that the script is only 16 lines long!
function
alternateRowColor(tableid,lightclass,darkclass,overclass)
{
var tableid =
document.getElementById(tableid);
var rows =
tableid.tBodies[0].rows;
for(var ii = 0; ii < rows.length;
ii++) {
var row =
rows[ii];
if(ii % 2)
{
row.className =
lightclass;
row.onmouseover = function ()
{overRow(this.id,overclass);};
row.onmouseout = function ()
{overRow(this.id,lightclass);};
} else
{
&nb
sp; row.className = darkclass;
&nb
sp; row.onmouseover = function ()
{overRow(this.id,overclass);};
&nb
sp; row.onmouseout = function ()
{overRow(this.id,darkclass);};
}
}
}
I've added a nice little row highlighting function to the
mouseover and mouseout events called
overRow(). This function only
adds 3 lines of code:
function overRow(rowid, classname) {
document.getElementById(rowid).clas
sName = classname;
}
The last thing to do is make sure that the
alternateRowColor() function
gets invoked every time the page loads. Instead of having
to place this in the body tag of all pages, all
that is needed is one line of code added to the same script
that will automatically run the function each time a page
loads:
window.onload=function(){
alternateRowColor('alternateRows','light','dark','over');}
That's all there is to it. See it in action.