а

Manually set a lightbox section with data


#1

Hi I am trying to set a lightbox section with data returned from a db query.

I am in the dhtmlxscheduler.js file. Under the following section of the code.

(scheduler._init_lightbox_events = function() {
(this.getLightbox().onclick = function(e) {
var t = e ? e.target : event.srcElement;
if (
(t.className || (t = t.previousSibling),
!(
t &&
t.className &&
scheduler._getClassName(t).indexOf(“dhx_btn_set”) > -1
) || (t = t.querySelector("[dhx_button]")))
) {
var i = scheduler._getClassName(t);
if (t && i)
switch (i) {
case “dhx_save_btn”:

some code here …

saves to DB
scheduler.formSection(‘Event DBCheck’).setValue = 1;
document.getElementsByName(“Event DBCheck”)[0].checked = “checked”;

does not save
document.getElementsByName(“Event DBChecks”).value = DBCheck_Text;

scheduler.save_lightbox();

I do my db query and get the data returned but the text is not being saved to the database.


#2

I figured it out.

          document.getElementsByName("Event DBChecks").value =  DBCheck_Text;

needed to be like this:

          document.getElementsByName("Event DBChecks").value(DBCheck_Text);

#3

Hi,

Thank you for sharing the solution.