I’m using php to add an event, some logic is used find a film in the database by selecting the name (cinema scheduler) and the event is added using the films name, start and end time.
On the front end when you click to add the event the details are not updated, a refresh on the screen updates these but this isnt ideal as it sends you back to the first screen.
I’ve tried adding this in the client side
scheduler.attachEvent("onEventAdded", function(event_id,event_object){
var myObj = scheduler.getEvent(event_id);
scheduler.setEventText(event_id, myObj.event_name);
});
And can get the name of the event, but because the end time is determined from the film database i can’t update the setEndDate using the same method. Any ideas what i should use?
I see also that setEventEndDate(event_id, end_date) takes a date object to update, i’ve tried using php to update the end_date but with no luck.
The problem is because i’m not setting the end date on the lightbox, i’m doing it from a row in a database, there is no way of updating the end time on the displayed event on the front end without reloading the data, maybe i can figure this out with ajax but can anyone figure out a simpler solution?
thanks for the reply Stanislav, sorry it’s took me this long to respond, i never subscribed to notifications.
The code works in the fact that it updates the event without refresh, one weird quirk is at first it doesnt seem to work and nothing happens but as soon as you click on the top of the event it seems to fire and updates, very strange. I’ve put alerts and it is defo the inserted action that does the updating it just doesnt seem to update with a click on the top.
And by the way for anyone else it is inserted instead of insert
Following line
scheduler.getEvent(tid).end_date = new Date(tag.getAttribute(“date”));
only updates event property. Try calling refresh view (setCurrentView for the same date and view) to re-render all events. Or updateEvent.
Following on from this topic, everything is working ok in Chrome but in all the other browsers my event disappears, maybe this is a cross browser issue as i have no errors in firebug. My code is below, maybe there is another way to update an events end date and name without refreshing the view
tag.getAttribute(“date”)
Can you provide the sample of date value stored in XML? In which format it is stored?
Latest version of FF have changes in date parsing which can cause the problem, and your code must need to be updated according to the date format.
Also, if you are using FF9 - be sure to update to FF10, as FF9 has known bugs
Get a guaranteed answer from DHTMLX technical support team
under the most suitable support plan