I found something interesting sample: samples/03_extensions/06_links_plugin.html.
In my case, I would rather turn to other webpage in our system when the day label in month view as a link is clicked. please let me have a working code if it’s possible.
Hi,Ilya
It works but the page only turns to the dhx defined dailyview, but not my defined view when the hyperlink is clicked. it just only moved to the dhx defined dailyview even though i replaced the function.
For example, my code is something like that below:
scheduler.templates.month_day = function(date){
var str = ‘’;
dhtmlxEvent(this._obj,"click",function(e){
var start = e.target || event.srcElement;
var to = start.getAttribute("jump_to");
if (to) {
scheduler.setCurrentView(s_d(to),"unit");
if (e && e.preventDefault) e.preventDefault();
else
if (window.event && window.event.returnValue)
window.eventReturnValue = false;
}
})
You can comment this whole block as it served to listen for click event, check if there was ‘to’ property, convert it to date and move to another view.
I really appreciate your answer. It works as you mentioned above. Unfortunately, in spite of no cilick event, it jumps to the my defined page as soon as the scheduler is loaded. please let me know how to solve it.
It’s my code:
scheduler.templates.month_day = function(date){
var str = ‘’;
scheduler.init('scheduler',date,"month");
scheduler.attachEvent("click",function(e){
var start = e.target || event.srcElement;
var to = start.getAttribute("jump_to");
if (to) {
scheduler.setCurrentView(s_d(to),"unit");
if (e && e.preventDefault) e.preventDefault();
else
if (window.event && window.event.returnValue)
window.eventReturnValue = false;
}
});
we directly execute link function with date as parameter which itself fires
actSubmit(document.xxxxForm, "<c:url value="/dxx/oxx/xxxFrom.dev" />");
function and that makes specified link to be loaded from the start.
Best regards,
Ilya
Get a guaranteed answer from DHTMLX technical support team
under the most suitable support plan