Front Door                                                                 
 

The Javascript Y2K problem

Have you ever wondered what people can find out about you online ??

This script shows you what information is available to anybody who wants it and there's more to be had.

Mouse Button script

Determine which mouse button is being clicked to fire other functions. This function is only available with 'onmousedown','onmouseup','onmouseover'. For this example, 'onmousedown' is used. Click on the box below to test.

Klick me

                Spotlight script

Artificial Intelligence ??

Flying Menus ??

 

The Javascript Y2K problem :

You may have noticed that some dates generated with Javascript have a Y2K problem; especially when viewed with The Netscape browser.

This is a workaround that should function with both Browsers

<script language="JavaScript">
//This line tells the browser it is beginning a JavaScript code section.

// Begin
//This line is pretty much standard in all JavaScripts - it tell 'ancient' browsers that don't support JavaScript to ignore //the following script.
when = new Date();
//This line set the day variable to a new Date. Since Date() has no parameters -- nothing inside the parenthesis -- the //default date is set to the exact moment the script is loaded.
day = when.getDate();
//This statement extracts the current day of the month, for example the 3 in January 3, 2000
year = when.getYear();
//And, this line will extract the current year correctly as 19xx for years less than 2000, but reads 100 for 2000. //Netscape's getFullYear() function attempts to work-around this, but here's a easier and more reliable solution until //the getFullYear() function is supported by all major browsers....
if (year < 2000)
year = year + 1900;

//If the year is read correctly as 2000 (or more) in the browser, everything is ok and the next line is ignored. If, //however, the browser reads 100 instead, the if statement evaluates to true (100 < 2000 "100 is less than 2000") //and the next line ads 1900 to it, to make it 2000. year equals year plus 1900, (100 + 1900 = 2000) then you can //have any
document.write(year);
//statements you want, etc here. And, the year will be Y2K compatible! Then, you finish the script tags, like this....
// End -->
</script>