load options for "select" by ajax when LightBox first open

Hello Support Team!

Scheduler with Lightbox.
Lightbox has editor with type “select”.
I need to load init options for “select” during first opening Lightbox.

Scheduler section is follow:

			scheduler.config.lightbox.sections=[	
 				{name:"procedure_list",
                        height:21,
                        map_to:"proc_name_id",
                        type:"select",
                        options: ... , // load options by sync ajax
                        cache:true
                },
                ...
			];
			...

I have java servlet with connector for retrieving list for option (procedure_list).
So, how to retrieve options once from server and set this option list to “select” editor when Lightbox opens?
any example or hint.
The standard solution - attach optionConnector to scheduler connector.
But I need option (procedure_list ) when LightBox will open only.
And don’t need to send procedure_list when scheduler each render process.

Thank you!

Hi, you can specify lightbox options with scheduler.serverList. Then you could load options with ajax request on the first onBeforeLightbox event and update server list and reset lightbox
docs.dhtmlx.com/doku.php?id=dhtm … serverlist
docs.dhtmlx.com/doku.php?id=dhtm … collection
docs.dhtmlx.com/doku.php?id=dhtm … relightbox

alternatively, you could use ‘combo’ select, which loads options when opened
docs.dhtmlx.com/doku.php?id=dhtm … uler:combo

Hello Aliaksandr!

Many thanx for solutions!