I am having a problem with the jCal plugin. I have no javascript errors when the page is loaded locally however when the page is loaded online the jCal function can not be found. I think the jCal function is called before jCal/jCal.js file is executed. http://aidnetgc.com/test/volunteer.html
-
as a side note you should load your main header image aidnetgc.com/img/banner.jpg into photoshop and choose file | save for web and get that down to a reasonable size. 144k is way too large!rtpHarry– rtpHarry2011年07月29日 19:48:46 +00:00Commented Jul 29, 2011 at 19:48
5 Answers 5
GET http://aidnetgc.com/test/jCal/jCal.js 403 (Forbidden)
chmod jCal folder to 755
"jCal.js Failed to load resource: the server responded with a status of 403 (Forbidden)" looks like a permissions issue.
Comments
If you look at the Net tab in Firebug when viewing your site, you'll see that the jCal.js file is not being loaded.
It is giving a 403 Forbidden error.
Comments
If you tried to access the file using the url http://aidnetgc.com/test/jCal/jCal.css you will get a permission issue, so you have to give the right permission so that the jacl file get's loaded
Comments
Try changing your javascript to look like this:
<script language="JavaScript" type="text/javascript">
$(document).ready(function () {
$('#calTwo').jCal({
day: new Date( (new Date()).setMonth( (new Date()).getMonth() ) ),
days: 1,
showMonths: 1,
dayOffset: 1, // start week on Monday
dow: ['M', 'T', 'W', 'T', 'F', 'S', 'S'],
sDate: new Date(),
dCheck: function (day) {
return 'day';
},
callback: function (day, days) {
var da = (day.getMonth() + 1 ) + '/' + day.getDate() + '/' + day.getFullYear();
if (jQuery.inArray(da, dates) == -1)
{
dates.push(da);
}
popDropdown();
return true;
}
});
var dates = new Array();
$("#remove").click(function () {
var indexA = jQuery.inArray($("#datesPicks :selected").text(), dates)
dates.splice(indexA,1);
popDropdown();
return false;
});
function popDropdown()
{
//Clear the HTML Select DropdownList
$("#datesPicks option").remove();
//Add Default Option
//$("#datesPicks").append(GetOption("Please select a date", "0"));
//Loop through array and add options
$.each(dates, function (index) {
$("#datesPicks").append(GetOption(dates[index]));
});
}
function GetOption(text)
{
return "<option value = '" + text + "'>" + text + "</option>"
}
</script>
5 Comments
.ready() and also it seems like there is a floating }) on the end?.ready() overset.com/2008/05/12/…