Hi,
my lightbox have 2 radio button. It is possibile to select one of them as default choice?
I try with this code but it doesn’t work
scheduler.attachEvent("onEventCreated", function(id){
scheduler.getEvent(id).selectme = '1';
});
So i have modified dhtmlxscheduler_editor.js int his way
[code]scheduler.form_blocks[‘radio’]={
render:function(sns) {
var res = ‘’;
res += “
”;
for (var i=0; i<sns.options.length; i++) {
var id = scheduler.uid();
if(sns.options[i].checked != null && sns.options[i].checked!=‘undefined’)
res += “”+" “+sns.options[i].label+”";
else
res += “”+" “+sns.options[i].label+”";
if(sns.vertical)
res += “
”;
}
res += “
”;
for (var i=0; i<sns.options.length; i++) {
var id = scheduler.uid();
if(sns.options[i].checked != null && sns.options[i].checked!=‘undefined’)
res += “”+" “+sns.options[i].label+”";
else
res += “”+" “+sns.options[i].label+”";
if(sns.vertical)
res += “
”;
}
res += “
return res;
},
set_value:function(node,value,ev,config){
var radiobuttons = node.getElementsByTagName('input');
for (var i = 0; i < radiobuttons.length; i++) {
radiobuttons[i].checked = false;
if (radiobuttons[i].value == ev[config.map_to]) {
radiobuttons[i].checked = true;
}
}
},
get_value:function(node,ev,config){
var radiobuttons = node.getElementsByTagName('input');
for(var i=0; i<radiobuttons.length; i++) {
if(radiobuttons[i].checked) {
return radiobuttons[i].value;
}
}
},
focus:function(node){
}
};[/code]
Now html code have checked as properties but radio button still remain unchecked, can you help me?
thank you.