auto load a html document from within another html page?

Michael

New member
Hi,

Hope someone is able to help/point me in the right direction with this problem.

I have some code which sets which month and year it is so that i can then display the current month as the default calendar.

<script language="JavaScript">
var d = new Date();
var m = d.getMonth()+1;
var y = d.getFullYear();
document.write('<link href="/Calendar/' + y + '/' + m + '.html">');
document.write('<a href="/Calendar/' + y + '/' + m + '.html">Click here</a>');
</script>

Currently the user has to click on a link to display the month.

What i would like is that when the user calls the calendar.html page it will get and display the default month html page. ie 10.html automatically without any intervention form the user.

How can i change the code to accomplish this.

Thanks

Michael
 
Back
Top