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)
{redirURL='index2.html'}
if (screen.width == 1280)
{redirURL='index2.html'}
if (screen.width == 1152)
{redirURL='index2.html'}
if (screen.width == 1024)
{redirURL='index2.html'}
if (screen.width == 800)
{redirURL='index3.html'}
if (screen.width == 640)
{redirURL='index3.html'}
if (screen.width <= 639)
{redirURL='index3.html'}
redirTime = "1500";
function redirTimer() { self.setTimeout("self.location.href = redirURL;",redirTime); }
footnotes
-
‘Five exclamation marks, the sure sign of an insane mind.’ — Terry Pratchett ↩
created