The view looks now as follows: <script src="{{=URL('static','js/dhtmlxscheduler.js')}}" type= "text/javascript"></script> <link rel="stylesheet" type="text/css" href= "{{=URL('static','css/dhtmlxscheduler.css')}}"/> {{extend 'layout.html'}} <h2>Example of scheduler</h2>
<div id="scheduler_here" class="dhx_cal_container" style='width:100%; height :100%;'> <div class="dhx_cal_navline"> <div class="dhx_cal_prev_button"> </div> <div class="dhx_cal_next_button"> </div> <div class="dhx_cal_today_button"></div> <div class="dhx_cal_date"></div> <div class="dhx_cal_tab" name="day_tab" style="right:204px;"></div> <div class="dhx_cal_tab" name="week_tab" style="right:140px;"></div> <div class="dhx_cal_tab" name="month_tab" style="right:76px;"></div> </div> <div class="dhx_cal_header"></div> <div class="dhx_cal_data"></div> </div> <script type="text/javascript"> scheduler.config.xml_date="%Y-%m-%d %H:%i"; scheduler.init('scheduler_here', new Date(),"month"); scheduler.load("{{=URL('rentals_load')}}","json"); myDataProcessor = new dataProcessor('{{=URL("rentals_process")}}/'); myDataProcessor.init(scheduler); myDataProcessor.setTransactionMode("POST"); myDataProcessor.attachEvent("onAfterUpdate", function(id, action, tid, response){ alert('id='+ id + ' action= ' + action + ' tid=' + tid + ' response=' + JSON.stringify(response)); }) </script> The controllers are as follows: def rentals_load(): rows={} query=db.rentals.id>0 rows=db(query).select(db.rentals.id, db.rentals.startdate.with_alias( 'start_date'),db.rentals.enddate.with_alias('end_date'), db.rentals. reservationcode.with_alias('text')) return response.json(rows) def rentals_process(): return response.json(request.vars) If I change somethin in the scheduler I get an alert message what has been changed plus all the values and parameters. See image <https://lh3.googleusercontent.com/-L5VXywhxuXc/Vvhsn_28t_I/AAAAAAAACTs/6T8hwvfzyUYqB0zG08p_DqySorRsIp_OQ/s1600/Naamloos.png> Thank you Leonel for putting me on this track again. Going further to write te controller functions... Some notes: the {{extend 'layout.html'}} has to come after the links to the scheduler javascript. Don't know why. This way it works. Be aware of the slash after the URL in myDataProcessor = new dataProcessor('{{=URL("rentals_process")}}/'); without you get an error message. Henk -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.