Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Mario Granados on Jun 12, 2009 10:13
open dhtmlx forum
Modify or add Info to the dhtmlx Scheduler

Hi there!
Well my questions are kinda simple,

1.- in the event window of the Scheduler I need some extra info like the place where the event wiil occur and the person who is making the event, and event type, that data is my MySQL database,

2.- There's another way to save/load the info of events diferent for dataprocesor/php connector.

Greetings!
and Thanks for the pattience

Off-topic question.
do you know how use the php connector along with php frameworks (in my case cake php)?


Answer posted by Alex (support) on Jun 12, 2009 10:42

Hello,

The answer to the first question is described in the following post: 

 http://dhtmlx.com/docs/products/kb/index.php?s=normal&q=9633

>> There's another way to save/load the info of events diferent for dataprocesor/php connector.

You can use event handlers in this case - onEventChanged for example. 

But in this case using the approach recommended in the mentioned post becomes more complicated.

>> do you know how use the php connector along with php frameworks (in my case cake php)?

Connectors directly interact with database. So, there is no need to use frameworks. For which purpose do you want to use it ?

Answer posted by Mario Granados on Jun 16, 2009 08:40

>> There's another way to save/load the info of events diferent for dataprocesor/php connector.

You can use event handlers in this case - onEventChanged for example.

I understand that, but how can be the data of the scheduler be accesed, for example I want sent it to my php functions with a POST, but I need where the data is.
hope you have understand my question.

Answer posted by Alex (support) on Jun 16, 2009 09:28

Hello,

Event properties can be got by the following approach:

scheduler.getEvent(eventId).[property]

the event always has following properties:

  • text
  • start_date
  • end_date

var text = scheduler.getEvent(id).text;

Answer posted by Mario Granados on Jun 16, 2009 14:15
I'm trying this:
scheduler.init('scheduler_here');
        scheduler.attachEvent("onEventAdded",nuevo);
.....
 function nuevo(event_id,event_object){
            var text = scheduler.getEvent(event_id);
                    alert("new event");
        }
and the result is, when I load the scheduler the alert "new event" is shown, when I do a double click on a date the alert is shown,
I don't if I'm missing something of if there is a more extractly function to perform an action when the user really saves the event.

Thanks!
Answer posted by Support on Jun 17, 2009 01:36
You can use "scheduler._loading" flag, to ignore events added from XML or any other external source. 
Sample is attached.
Attachments (1)
sched18.zip27.72 Kb
Answer posted by Mario Granados on Jun 17, 2009 08:35
Thanks, for your answers my problem was solve thanks for everything.