Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by jennifer on Jun 18, 2009 10:38
open dhtmlx forum
okay... but nothing as far as the db is concerned is syncing with the server.  As soon as I navigate away ...

okay... but nothing as far as the db is concerned is syncing with the server.  As soon as I navigate away from the scheduler after making changes to an event and saving them they appear on the page.  However when I leave the scheduler and return they are not there.  Furthermore they are not being updated in the db.  Here is my events.php code.  Maybe I am just not getting it or I need to invoke some method after a specific event?  I have reviewed
sample_db.html and in fact that is how I  got it to retrieve info from the db. 


<?php
    include ('../codebase/connector/scheduler_connector.php');

    // Connect to DB
    $user = "#######";
    $pass = "###########";
    $host = "##########";
    $db_name = "#####";

    $res=mysql_connect($host,$user,$pass);

    mysql_select_db($db_name);

    $scheduler = new schedulerConnector($res);
    $scheduler->enable_log("scheduler_log.txt",true);
    $scheduler->render_table(
        "calendar_events",
        "cal_event_id",
        "cal_event_start,cal_event_end,cal_event_title,cal_event_desc, cal_event_priority"
    );
?>

and the my init code is:

function init() {

        scheduler.config.xml_date="%Y-%m-%d %H:%i";
        scheduler.config.lightbox.sections=[
            {name:"description", height:130, map_to:"text", type:"textarea" , focus:tr
            {name:"location", height:43, type:"textarea", map_to:"details" },
            {name:"time", height:72, type:"time", map_to:"auto"}
        ]
        scheduler.config.first_hour=8;
        scheduler.locale.labels.section_location="Location";
        scheduler.config.details_on_create=true;
        scheduler.config.details_on_dblclick=true;

        scheduler.init('scheduler_here',null,"week");
        scheduler.load("events.php?uid="+scheduler.uid());

        var dp = new dataProcessor("events.php")
        dp.init(scheduler);
    }
  

Thanks so much for your help.

Jen

Answer posted by Support on Jun 19, 2009 01:44
The code, which you are using, looks correct and must be enough to save all changes in DB

>>  $scheduler->enable_log("scheduler_log.txt",true);
Is log file contains info about errors during data saving ? 

You can try to use dhtmlxscheduler_debug.js instead of compressed one, it shows info about all client server calls and their results.