Open Webpage By Current Month

  • Thread starter Thread starter hfhhawgman
  • Start date Start date
H

hfhhawgman

I am in charge of a county website that has monthly calendars of
events. I would like to have the current months calendar open when a
surfer clicks on my Calendar link in my navagation menu. Right now it
opens up to January's calendar and then you can use a drop-down menu
to select which month to look for events.

Our web pages are .asp types. My caneldar web pages are named
calendar1.asp through calendar12.asp, but I can rename to make them
more java compatiable.

Here is my script that selects the "calendar":

function mmLoadMenus()
{
if (window.mm_menu_1005013704_0) return;
window.mm_menu_1005013704_0 = new Menu("root",175,21,"tahoma",
11,"#EFE9DC","#ffffff","#710000","#000033","left","middle",
3,0,1000,-5,7,true,true,true,0,false,false);
mm_menu_1005013704_0.addMenuItem("Calendar","location='?page=General
%20Information/Calendar/calendar1.asp'");
mm_menu_1005013704_0.addMenuItem("Current Events","location='?
page=General%20Information/CurrentEvents.asp'");
mm_menu_1005013704_0.addMenuItem("Elections Home","location='?
page=index.asp'");
mm_menu_1005013704_0.addMenuItem("Job Openings","location='?
page=General%20Information/JobOpenings.asp'");

mm_menu_1005013704_0.addMenuItem("Meet The Supervisor","location='?
page=General%20Information/MeetTheSupervisor.asp'");

mm_menu_1005013704_0.addMenuItem("Office Information","location='?
page=General%20Information/OfficeInformation.asp'");
mm_menu_1005013704_0.addMenuItem("Send Feedback","location='?
page=feedback.asp'");
mm_menu_1005013704_0.hideOnMouseOut=true;
mm_menu_1005013704_0.menuBorder=1;
mm_menu_1005013704_0.menuItemBorder=1;
mm_menu_1005013704_0.menuLiteBgColor='#cccccc';
mm_menu_1005013704_0.menuBorderBgColor='#666666';
mm_menu_1005013704_0.bgColor='#cccccc';


Any help out there on this?
 
I am in charge of a county website that has monthly calendars of
events. I would like to have the current months calendar open when a
surfer clicks on my Calendar link in my navagation menu. Right now it
opens up to January's calendar and then you can use a drop-down menu
to select which month to look for events.

Our web pages are .asp types. My caneldar web pages are named
calendar1.asp through calendar12.asp, but I can rename to make them
more java compatiable.

Here is my script that selects the "calendar":

function mmLoadMenus()
{
if (window.mm_menu_1005013704_0) return;
window.mm_menu_1005013704_0 = new Menu("root",175,21,"tahoma",
11,"#EFE9DC","#ffffff","#710000","#000033","left","middle",
3,0,1000,-5,7,true,true,true,0,false,false);
mm_menu_1005013704_0.addMenuItem("Calendar","location='?page=General
%20Information/Calendar/calendar1.asp'");
mm_menu_1005013704_0.addMenuItem("Current Events","location='?
page=General%20Information/CurrentEvents.asp'");
mm_menu_1005013704_0.addMenuItem("Elections Home","location='?
page=index.asp'");
mm_menu_1005013704_0.addMenuItem("Job Openings","location='?
page=General%20Information/JobOpenings.asp'");

mm_menu_1005013704_0.addMenuItem("Meet The Supervisor","location='?
page=General%20Information/MeetTheSupervisor.asp'");

mm_menu_1005013704_0.addMenuItem("Office Information","location='?
page=General%20Information/OfficeInformation.asp'");
mm_menu_1005013704_0.addMenuItem("Send Feedback","location='?
page=feedback.asp'");
mm_menu_1005013704_0.hideOnMouseOut=true;
mm_menu_1005013704_0.menuBorder=1;
mm_menu_1005013704_0.menuItemBorder=1;
mm_menu_1005013704_0.menuLiteBgColor='#cccccc';
mm_menu_1005013704_0.menuBorderBgColor='#666666';
mm_menu_1005013704_0.bgColor='#cccccc';


Any help out there on this?

Don't know if this helps but this is the script I use to open this month's
calendar, where the calendars are named
calendar0701.html,calendar0702.html,calendar0703.html, etc. for Jan 2007,
Feb 2007, Mar 2007, respectively

function loadCalendar()
{
var now = new Date()
var year = now.getYear().toString().substr(2)
var monthno = now.getMonth() + 1
monthno = (monthno < 10) ? '0' + monthno : monthno

location.href = 'calendar' + year + monthno + '.html'
}
//------------------------------
This is the calendar link
<a href="" onclick="loadCalendar();return false">Event Calendar</a>

If you use this naming system, I guess you would have to modify this line:
mm_menu_1005013704_0.addMenuItem("Calendar","location='?page=General%20Information/Calendar/calendar1.asp'");
to:

mm_menu_1005013704_0.addMenuItem("Calendar","location='?page=General%20Information/Calendar/calendar"
+ year + monthno + ".asp'");
(Not tested)
--
Cheers,
Trevor L.
[ Microsoft MVP - FrontPage ]
MVPS Website: http://trevorl.mvps.org/
----------------------------------------
 
I am in charge of a county website that has monthly calendars of
events. I would like to have the current months calendar open when a
surfer clicks on my Calendar link in my navagation menu. Right now it
opens up to January's calendar and then you can use a drop-down menu
to select which month to look for events.
Our web pages are .asp types. My caneldar web pages are named
calendar1.asp through calendar12.asp, but I can rename to make them
more java compatiable.
Here is my script that selects the "calendar":
function mmLoadMenus()
{
if (window.mm_menu_1005013704_0) return;
window.mm_menu_1005013704_0 = new Menu("root",175,21,"tahoma",
11,"#EFE9DC","#ffffff","#710000","#000033","left","middle",
3,0,1000,-5,7,true,true,true,0,false,false);
mm_menu_1005013704_0.addMenuItem("Calendar","location='?page=General
%20Information/Calendar/calendar1.asp'");
mm_menu_1005013704_0.addMenuItem("Current&nbsp;Events","location='?
page=General%20Information/CurrentEvents.asp'");
mm_menu_1005013704_0.addMenuItem("Elections&nbsp;Home","location='?
page=index.asp'");
mm_menu_1005013704_0.addMenuItem("Job&nbsp;Openings","location='?
page=General%20Information/JobOpenings.asp'");


Any help out there on this?

Don't know if this helps but this is the script I use to open this month's
calendar, where the calendars are named
calendar0701.html,calendar0702.html,calendar0703.html, etc. for Jan 2007,
Feb 2007, Mar 2007, respectively

function loadCalendar()
{
var now = new Date()
var year = now.getYear().toString().substr(2)
var monthno = now.getMonth() + 1
monthno = (monthno < 10) ? '0' + monthno : monthno

location.href = 'calendar' + year + monthno + '.html'}

//------------------------------
This is the calendar link
<a href="" onclick="loadCalendar();return false">Event Calendar</a>

If you use this naming system, I guess you would have to modify this line:
mm_menu_1005013704_0.addMenuItem("Calendar","location='?page=General%20Info­rmation/Calendar/calendar1.asp'");
to:

mm_menu_1005013704_0.addMenuItem("Calendar","location='?page=General%20Info­rmation/Calendar/calendar"
+ year + monthno + ".asp'");
(Not tested)
--
Cheers,
Trevor L.
[ Microsoft MVP - FrontPage ]
MVPS Website:http://trevorl.mvps.org/
----------------------------------------- Hide quoted text -

- Show quoted text -

Thanks.

I'll try that Monday when I get back to the office and let you know.

Regards,
 
Back
Top