miscoded

the web is a hack

either too old or too modern (!)

, , ,

A few things about this source code might be amusing, but the funniest thing is that the developer writing it was clear-sighted enough to predict that a web browser "too modern" to deal with his code might one day emerge:
//PopUp Calendar BEGIN--------------
if (navigator.appName != "Netscape")
{
if (document.all) {
	document.writeln("<div id=\"PopUpCalendar\" style=\"position:absolute; left:0px; top:0px; z-index:7; width:200px; height:77px; overflow: visible; visibility: hidden; background-color: #FFFFFF; border: 1px none #000000\" onMouseOver=\"if(ppcTI){clearTimeout(ppcTI);ppcTI=false;}\" onMouseOut=\"ppcTI=setTimeout(\'hideCalendar()\',500)\">");
	document.writeln("<div id=\"monthSelector\" style=\"position:absolute; left:0px; top:0px; z-index:9; width:181px; height:27px; overflow: visible; visibility:inherit\">");}
else if (document.layers) {
	document.writeln("<layer id=\"PopUpCalendar\" pagex=\"0\" pagey=\"0\" width=\"200\" height=\"200\" z-index=\"100\" visibility=\"hide\" bgcolor=\"#FFFFFF\" onMouseOver=\"if(ppcTI){clearTimeout(ppcTI);ppcTI=false;}\" onMouseOut=\"ppcTI=setTimeout('hideCalendar()',500)\">");
	document.writeln("<layer id=\"monthSelector\" left=\"0\" top=\"0\" width=\"181\" height=\"27\" z-index=\"9\" visibility=\"inherit\">");}
else {
	document.writeln("<p><font color=\"#FF0000\"><b>Error ! The current browser is either too old or too modern (usind DOM document structure).</b></font></p>");}
}
	document.write ("<noscript><p><font color=\"#FF0000\"><b>JavaScript is not activated !</b></font></p></noscript>");
The result is the red warning message on this page of an airline I must be too modern to book tickets from: So, actually, simply by switching navigator.appName from "Netscape" to "Opera" a few years back we became modern. So that's a challenge to Chrome, Firefox and IE: you know you want to be as modern as us - what are you waiting for? smile

Don't look to IE anymore..anti-semantic ARIA abuse - it just feels so wrong

Comments

Robert MeijersRobert90 Monday, September 12, 2011 11:00:23 AM

document.write ("<noscript><p><font color=\"#FF0000\"><b>JavaScript is not activated !</b></font>>/p></noscript>");

Yeah, lets use some javascript to notify the user that javascript is disabled. Another developer that doesn't test all the use cases/paths through the code cry

Rafael Luikrafaelluik Monday, September 12, 2011 1:16:45 PM

lol

Michael A. Puls IIburnout426 Monday, September 12, 2011 1:44:08 PM

Yeh, only IE is allowed to have a navigator.appName that's not "Netscape". Chrome, Firefox and Safari are to scared to not use "Netscape". smile

d4rkn1ght Monday, September 12, 2011 8:30:08 PM

lol up

Jimtoyotabedzrock Monday, September 12, 2011 11:00:42 PM

I would pick another airline, lol.

Charles SchlossChas4 Tuesday, September 13, 2011 6:15:05 PM

Cutting Spoonhellspork Monday, September 19, 2011 8:44:26 PM

Too modern to fly....TELEPORT??