alexander
Junior Member
Posts: 5
Registered: 8/22/2007
Member Is Offline
|
| posted on 8/22/2007 at 02:41 PM |
|
|
Changing the source
Hello,
I need to put calendar1.js, calendar.html and the img folder within a new folder named "resources"
when I do this the calendar doesn't show.
what source I have to change?
Thanks in advance
Alexander!
|
|
|
tigra
Administrator
Posts: 1976
Registered: 6/17/2002
Location: US, CO
Member Is Offline
|
| posted on 8/22/2007 at 06:20 PM |
|
|
Make sure the path to calendar.html in window.open(..) statement inside calendar.js is correct. Also adjust the path to the images directory inside
calendar.html if needed.
|
|
|
alexander
Junior Member
Posts: 5
Registered: 8/22/2007
Member Is Offline
|
| posted on 8/22/2007 at 06:34 PM |
|
|
I did that and it shows OK, but when I'm trying to move between months/years I'm receiving a path error because the path is
"resources/resources/calendar.html" and it should be "resources/calendar.html"
|
|
|
tigra
Administrator
Posts: 1976
Registered: 6/17/2002
Location: US, CO
Member Is Offline
|
| posted on 8/22/2007 at 06:47 PM |
|
|
use absolute path, one that starts from http:// or from /
|
|
|
alexander
Junior Member
Posts: 5
Registered: 8/22/2007
Member Is Offline
|
| posted on 8/22/2007 at 07:04 PM |
|
|
Thanks for your help, but, isn't there any other solution? I wouldn't like to use absolute path?
|
|
|
tigra
Administrator
Posts: 1976
Registered: 6/17/2002
Location: US, CO
Member Is Offline
|
| posted on 8/22/2007 at 09:29 PM |
|
|
Relative paths are resolved relatively to the current directory. Once you change the current directory by following the relative path you can't use
it again from there. You should either use absolute paths or provide different relative path in each directory that you enter (which means multiple
copies of calendar.html or other not-so-elegant solutions).
|
|
|
alexander
Junior Member
Posts: 5
Registered: 8/22/2007
Member Is Offline
|
| posted on 8/22/2007 at 09:36 PM |
|
|
what about pass folder_name as a parameter/argument?
|
|
|
tigra
Administrator
Posts: 1976
Registered: 6/17/2002
Location: US, CO
Member Is Offline
|
| posted on 8/23/2007 at 04:17 PM |
|
|
It's a bit tricky because the path is different depending on who calls the calendar (page or calendar itself). Attached is the version that uses the
approach you suggested.
Attachment: cal.zip (25.66kb)
This file has been downloaded 198 times
|
|
|
alexander
Junior Member
Posts: 5
Registered: 8/22/2007
Member Is Offline
|
| posted on 8/23/2007 at 04:26 PM |
|
|
Great!!!
Thank you very much!
Alexander!
|
|
|