My First JavaScript

I just found the first bit of JavaScript I ever wrote used on my first website. Let’s set the scene:

  • The site was built in Dreamweaver
  • It used frames (of course!)
  • It had green text on a black background (of course!!)
  • It is the absolute definition of cringe (of course!!!!!) 1
  • There were 2 sets of frames, one for 800×600 and 1024×768 resolutions
  • JavaScript was wrapped in a <script language="javascript"> tag in those days
  • It is not very good, and I clearly didn’t know what I was doing yet
if (screen.width == 1600)

if (screen.width == 1280)

if (screen.width == 1152)

if (screen.width == 1024)

if (screen.width == 800)

if (screen.width == 640)

if (screen.width <= 639)

redirTime = "1500";
function redirTimer() { self.setTimeout("self.location.href = redirURL;",redirTime); }
  1. ‘Five exclamation marks, the sure sign of an insane mind.’ — Terry Pratchett