Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by abderahmen on Jan 18, 2010 02:56
open dhtmlx forum
DhtmlxScheduler lightbox

Hello,
I'm trying to add a select field to the lightbox in a new form_blocks.
I done the steps described in this link http://www.dhtmlx.com/dhxdocs/doku.php?id=dhtmlxscheduler:custom_details_form but the problem is that i can't get the seleted item using the get_value function.
This is my code :
scheduler.form_blocks["Myselect"]={
                            render:function(sns){
                                return "<div class='dhx_cal_ltext' style='height:20px;'><select id='categories' name='categories'><cfloop query='qCategories'><option id='#qCategories.CATEGORY_ID#'>#qCategories.CATEGORY_NAME#</option></cfloop></select></div>";
                            },
                            set_value:function(node,value,ev){
                               
                            },
                            get_value:function(node,ev){
                                selected = node.getElementsByTagName("categories");
                                val = node.getElementsByTagName("categories").options[selected].value
                                return selected[1].value;

                                //return node.childNodes[0].value;
                            },
Can you help please.

Regards
Abderahmen
Answer posted by Alex (support) on Jan 18, 2010 03:15

Hello

try to use either  node.getElementById("categories") or  node.getElementsByTagName("select")[0] to get select object.