Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Siju on Nov 01, 2009 20:11
open dhtmlx forum
Capture the new events added in Scheduler

Hi,
Using the function 'scheduler.load', it is possible to load the existing events.Suppose I want capture the new event I have added , how can I do it.
Answer posted by Alex (support) on Nov 02, 2009 03:43

Hello,

you can use onEventCreated event handler:

scheduler.attachEvent("onEventCreated", function(event_id,event_object){
    /*your code here*/
});


Answer posted by Siju on Nov 02, 2009 05:22
Hi,
    Thanks,I am able to capture the event.  Suppose i want to get the details of the event I have added, how should I proceed.



Answer posted by Alex (support) on Nov 02, 2009 05:49

method getEvent allows to get event object by its id. So, the possible method is:

scheduler.attachEvent("onEventCreated", function(event_id,event_object){
  var event = scheduler.getEvent(event_id);
  alert(event.text);
});