0

I am using play 2.0.2. and implemented jquery calendar plugin in play. To load events to calendar i need to load a file. But when i am doing from play i am getting loading error.

the code written is

var url1= '@routes.Assets.at("Calender.ics")';
jfcalplugin.loadICalSource("#mycal",url1,"html");

Could any one suggest for this problem? (If the question is not clear please let me know.)

ThiefMaster
  • 310,957
  • 84
  • 592
  • 636
a_dev
  • 21
  • 1
  • 6
  • Check my edited answer please. There is advice how to debug JS in the browser, most probably you have some problem on JavaScript level. – biesior Aug 08 '12 at 13:41
  • Thanks for advice... i will recheck my JS code :) – a_dev Aug 08 '12 at 13:51
  • And set your name please, it's easier to remember to who I'm writing at the moment, than using user 123456789 :) – biesior Aug 08 '12 at 14:34

1 Answers1

2

The only way to check why it fails is using some inspection tool in your browser ie. FireBug for FireFox. Using this you can check what's wrong with sent requests (or received responses).

Maybe the created path to Calendar.ics is wrong... maybe loadICalSource() is broken, nobody knows, only you can check it.

Also preview the source HTML of created web-page to check if there is no error in syntax.

alternative

Don't want to force you, but you can just clone ready to use FullCallendar sample from github: https://github.com/biesior/Play-20-Sample-FullCalendar-Java.

For working with ajax in Play 2 also it's better to use javascriptRoutes

Community
  • 1
  • 1
biesior
  • 55,576
  • 10
  • 125
  • 182