Board Logo

calendar.html one level down in a subdirectory
Lila - 8/31/2002 at 11:52 PM

How can I move calendar.html one level down in the directory listing meaning

test.htm calls calendar.html in the ..subdirectorycalendar.html


tigra - 9/3/2002 at 07:36 AM

when moving calendar.js from the file it is called from make sure you specify absolute path (the one starting with slash like /subdirectory/calendar.js) in statement (file menu.js)

All calendar images should be referenced with absolute paths as well.

Lila - 9/3/2002 at 11:03 PM

it is not working

var obj_calwindow =
'calendar.html?datetime=' + this.dt_current.valueOf()+ '&id=' +, ......

if a change in

var obj_calwindow =
'html/calendar.html?datetime=' + this.dt_current.valueOf()+ '&id=' +, ......

tigra - 9/4/2002 at 08:05 AM

Again: make sure you specify absolute path (the one starting with slash).

Valid code for your case (if html is subdirectory of document root of your web server) would be:

var obj_calwindow =
'/html/calendar.html?datetime=' + this.dt_current.valueOf()+ '&id=' +, ......

Lila - 9/4/2002 at 09:10 AM

with all respect

if html is subdirectory

'/html/calendar.html?datetime... is not working I have to remove the first slash
If I remove the first slash I'm able to call the current month, but clicking on the next/previous month/year icon results in not finding the html page.

.... what is wrong maybe its just me? Thanks

tigra - 9/5/2002 at 02:15 PM

Don't forget about note:
if html is subdirectory of document root of your web server

Ok, assume your page is at:

And calendar is located at:

In statement you should specify:


This is absolute path.

Lila - 9/8/2002 at 01:53 AM

problem solved : thank you

I integrated the following code:

function cal_popup1 (str_datetime) {
this.dt_current = this.prs_tsmp(str_datetime ? str_datetime :;
if (!this.dt_current) return;

tmpString = strrev(unescape(location.pathname));
var i = 0;
for (i = 0; i < tmpString.length; i++)
if (tmpString.substring(i,i+1) == '\')
tmpString= strrev(tmpString.substring(i,tmpString.length));

var obj_calwindow =
'html/calendar.html?datetime=' + this.dt_current.valueOf()+ '&id=' +,
'Calendar', 'width=200,height='+(this.time_comp ? 215 : 190)+
obj_calwindow.opener = window;

strrev = is just a string reverse function

Lila - 9/8/2002 at 11:23 AM

additional correction

change the condition to

if (tmpString.substring(i,i+1) == '\' || tmpString.substring(i,i+1) == '/' )

this keeps the NetScape users happy

I only tried this code local and not on a host server.
any comment or corrections welcome

Thanks && Greetings

Back to forum: