showLightbox not showing

Hi,
I have a problem that showLightbox -function does not work, or I do not know how to use it correctly. My intension is to show lightbox on onTaskDblClick event, but nothing happens.

I have defined the gantt.config.lightbox.sections in the event and task’s id parameter is present too. I have also tried showQuickInfo and showTask but the result is the same. showCover is the only exeption allthough it only shows me blank grey layer.

Is there any complete tutorials around or some rules in order of function calls?

Please ask for more info, I am newbie in trouble :smiley:

Hi,
please provide a demo,
showLightbox works correctly with the basic configuration
docs.dhtmlx.com/gantt/snippet/80505e27
Maybe the issue is related to a custom API events handlers and customized configuration of the lightbox

Hi,
this is the current code. It is located inside ajax’s success function, so the response variable in gantt.parse() has all the data.

gantt.parse(response);
gantt.sort("start_date");	

gantt.attachEvent("onTaskDblClick", function(id) {
	 //Lightbox config
	 gantt.config.lightbox.sections = [
	 {name: "description", height:70, map_to:"text", type:"textarea"},
	 {name: "progress", height:70, map_to: "progress", type:"textarea"}	
	 ];
	 gantt.showLightbox(id);
	});	

Contents of the task object (gantt.getTask(id)) is in the png attachment.

I am also wondering why some of the functions, like getLightBox(), gives me an TypeError saying it is not a function?

Hello,

  1. Try reseting the lightbox after changing it’s config:
    docs.dhtmlx.com/gantt/snippet/ca8f2a9f

  2. Note that JS is case sensitive, and the method is called gantt.getLightbox ,
    docs.dhtmlx.com/gantt/api__gantt … htbox.html
    so gantt.getLightBox is indeed undefined