Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Prashant on Nov 11, 2009 03:34
open dhtmlx forum
making whole Lightbox / its elements read only

How can i make select boxes (hour,date,monthyear) read only based on some condition?. I am automatically mapping them to database. or moreover How can i make the whole lightbox form read only?


name:"time", height:72, type:"time", map_to:"auto"
Answer posted by Alex (support) on Nov 11, 2009 04:59

You can try to apply the following approach to disable on selectboxs in time section:

var setter = scheduler.form_blocks.time.set_value;

scheduler.form_blocks.time.set_value=function(node){
    var sels = node.getElementsByTagName("SELECT");
    if(...) /*some check here*/
       for(var i =0; i < sels.length;i++)
           sels[i].disabled = true;
    setter.apply(this,arguments);
}


Answer posted by Stanislav (support) on Nov 11, 2009 05:01
We are working on extension with similar functionality for oncoming update, if you are interested in beta version - please contact us at support@dhtmlx.com