Merely testing some JavaScript

greenspun.com : LUSENET : HTML test forum : One Thread



-- Kodanshi (kodanshi@onegai.net), July 13, 2001

Answers

Yes! It worked! How do I get it to not bring up that question about if you want to close that window? How do I get it to automatically close this window?

More:

Drink Budweiser

-- Kodanshi (kodanshi@onegai.net), July 13, 2001.




-- Kodanshi (kodanshi@onegai.net), July 13, 2001.

Go Back 4 Whole Pages!

-- Kodanshi (kodanshi@onegai.net), July 13, 2001.



-- Kodanshi (kodanshi@onegai.net), July 13, 2001.



-- Kodanshi (kodanshi@onegai.net), July 13, 2001.




-- Kodanshi (kodanshi@onegai.net), July 13, 2001.

// Copyright 2000, Peter Prins // http://askpete.alienalchemy.com/v2/freeware.shtml // This script is fully customizable by setting the config variables below // It is compatible with Netscape and Explorer on Mac, Windows, etc...

// config variables var TABLE_COLOR = "#00C0C0"; var MONTHYEAR_TEXT_COLOR = "#000000"; var WEEKDAYS_BGCOLOR = "#000000"; var WEEKDAYS_TEXT_COLOR = "#FFFFFF"; var CURRENT_DATE_BGCOLOR = "#C0C0C0"; var DATE_BGCOLOR = "#FFFFFF"; var DATE_TEXT_COLOR = "#000000";

function getDayStr(day_num){ switch(day_num){ case 0: return "Monday"; case 1: return "Tuesday"; case 2: return "Wednesday"; case 3: return "Thursday"; case 4: return "Friday"; case 5: return "Saturday"; case 6: return "Sunday"; default: return false; } }

function getMonthStr(month_num){ switch(month_num){ case 0: return "January"; case 1: return "February"; case 2: return "March"; case 3: return "April"; case 4: return "May"; case 5: return "June"; case 6: return "July"; case 7: return "August"; case 8: return "September"; case 9: return "October"; case 10: return "November"; case 11: return "December"; default: return false; } }

function getDaysInMonth(month_num, year_num){ switch(month_num){ case 0: return 31; case 1: if((year_num % 4) == 0){return 29;}else {return 28;} case 2: return 31; case 3: return 30; case 4: return 31; case 5: return 30; case 6: return 31; case 7: return 31; case 8: return 30; case 9: return 31; case 10: return 30; case 11: return 31; default: return false; } }

var currentDate = new Date(); var dayNum = currentDate.getDate(); var dayStr = getDayStr(dayNum); var monthNum = currentDate.getMonth(); var monthStr = getMonthStr(monthNum); var yearNum = currentDate.getYear(); if (yearNum < 1000) { yearNum += 1900; }

var startDate = new Date(yearNum, monthNum, 1); var startNum = startDate.getDay(); var startStr = getDayStr(startNum); var daysInMonth = getDaysInMonth(monthNum, yearNum);

// fix dates for output monthNum++;

// stylesheet if (navigator.appVersion.indexOf("Mac") > 1){ document.writeln("