Hello!
I decided to implement a event searcher (ajax search, filterable) in a seperate window.
When i select a searched item, scheduler jumps to the day of the event anbd selects it. Perhaps i will implement a highlighting while selected, but for the moment it is not that important.
For better undertsanding here’s my called function:
function goto_event(id) {
var goto_temp = scheduler.getEventStartDate(id);
// Thu Oct 07 2010 09:00:00 GMT+0200 is the format of goto_temp
//alert(goto.indexOf(":"));
//var temp_pos = goto_temp.lastIndexOf(":");
//var temp = goto_temp.charAt(temp_pos-2)+""+goto_temp.charAt(temp_pos-1);
scheduler.setCurrentView(goto_temp,"day");
scheduler.select(id);
//scheduler._els["dhx_cal_data"][0].scrollTop = (temp - scheduler.config.first_hour) * scheduler.config.hour_size_px;
}
I commented the lines not working yet, but my idea is to search the first “:” and than save the hour of the event by adding the two chars in front of that “:”. The scrollTop-Fucntion works great, just not getting the correct event hour (temp).
The error is totally strange: It tells me (via firefox extension), that indexOf is not a funciton… also when i use other js functions… strange? Ok, i puttet these function above the init-code and than… he says “split” is not a function… CXause this is used in dhtmlscheduler…
I thing i am losed,cause i can’t get the error… I thing it has nothing to do with scheduler?
So wanna ask for easier way to get the hour out of this events? ))
Temporarily the function works like a sharm without scrolling
Best wishes,
Ben