jkuruppu
Junior Member
Posts: 2
Registered: 7/17/2007
Member Is Offline
|
| posted on 7/18/2007 at 02:59 AM |
|
|
trouble installing...
I've searched, and found similar problems to mine, but no solutions yet....hoping someone can point me in the right direction.
i am calling the calendar2.js from within a perl-scripted cgi form, and have the scripts located as follows:
root/js/calendar2.js
root/cgi-bin/form.pl
root/cgi-bin/calendar.html
in the calendar2.js file, the entire URL to the calendar.html file is included:
var obj_calwindow = window.open(
"http://root/cgi-bin/calendar.html?id=" + this.id + '&s=' + this.dt_selected.valueOf() + '&c=' + this.dt_current.valueOf(),
'Calendar', 'width=200,height=' + (this.time_comp ? 215 : 190) +
',status=no,resizable=no,top=200,left=200,dependent=yes,alwaysRaised=yes'
);
the link to call the js looks like:
<input type="text" name="date" tabindex="1" size="40" />(mm/dd/yyyy)
<a href="javascript:cal2.popup();"><img border="0" height="16" src="http://root/images/cal.gif"
alt="Click Here to Pick up the date" width="16" /></a>
the header includes:
<script src="http://root/js/calendar2.js" type="text/javascript"></script>
and when i click on the calendar icon, I get the popup window, and the weekdays show up, and i have the following three errors:
Error: uncaught exception: Permission denied to get property Window.calendars
Error: dt_prev_month has no properties
Source File: http://root/cgi-bin/calendar.html?id=0&s=1184724977612&c=1184724977612
Line: 105
Error: dt_firstday has no properties
Source File: http://root/cgi-bin/calendar.html?id=0&s=1184724977612&c=1184724977612
Line: 123
root = my domain URL - which i can provide if anyone needs it, but it's in a password-protected area (not through .htaccess, but through a simple
cookie login script), and i can set up a guest access if it's needed....
|
|
|
tigra
Administrator
Posts: 1869
Registered: 6/17/2002
Location: US, CO
Member Is Offline
|
| posted on 9/28/2007 at 09:23 PM |
|
|
Browsers block cross-domain javascript communication. Usually you get this error message when the page and calendar.html are in different domains or
use different protocols.
|
|
|
jkuruppu
Junior Member
Posts: 2
Registered: 7/17/2007
Member Is Offline
|
| posted on 9/29/2007 at 12:08 AM |
|
|
i'm not sure i understand your reply. i showed you where i have my files located, and the page and the calendar.html files are in the same domain.
|
|
|
tigra
Administrator
Posts: 1869
Registered: 6/17/2002
Location: US, CO
Member Is Offline
|
| posted on 9/29/2007 at 03:10 AM |
|
|
I'm pretty sure the situation is caused by paths. Let's drop the domain name but still use absolute paths. http://root/ doesn't look like valid domain. Also let's move out HTML files out of cgi-bin directory. Try this layout and
paths:
/cgi-bin/form.pl
/js/calendar2.js
/js/calendar.html
|
|
|