0

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

asked Jul 29, 2011 at 19:14
1
  • 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! Commented Jul 29, 2011 at 19:48

5 Answers 5

3

GET http://aidnetgc.com/test/jCal/jCal.js 403 (Forbidden)

chmod jCal folder to 755

answered Jul 29, 2011 at 19:15
Sign up to request clarification or add additional context in comments.

1 Comment

757?? Surely 644 would be sufficient and more appropriate? Or is there a reason that execute and write (of the directory) are also called for?
3

"jCal.js Failed to load resource: the server responded with a status of 403 (Forbidden)" looks like a permissions issue.

answered Jul 29, 2011 at 19:17

Comments

2

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.

answered Jul 29, 2011 at 19:16

Comments

1

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

answered Jul 29, 2011 at 19:18

Comments

0

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>
genesis
51.1k20 gold badges99 silver badges127 bronze badges
answered Jul 29, 2011 at 19:18

5 Comments

that would not help. there's jCal.js extension not included
I admit you solutions seem to have hit the initial nail on the head but taking a look at that javascript I would guess that the jCal setup should be in a .ready() and also it seems like there is a floating }) on the end?
Assuming this is the correct plugin it does have the examples with the call inside a .ready() overset.com/2008/05/12/…
Well, I moved the file and changed the permissions but It still has the same error. I moved it to aidnetgc.com/volunteer.html
Thanks a ton guys! I will make it nice later.

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.