Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by amit on Jan 13, 2010 02:40
open dhtmlx forum
How to add Event with Text Box.

Hello,

 

I am makign a Block like this----

 

<div class='dhx_cal_ltext' style='height:170px;'> &nbsp;Subject&nbsp;<input type='text'><select style='width:200px;' id='akg' onchange='de();'><option value=''>------</option> </select><br><br>&nbsp;Customer&nbsp;<select style='width:200px;'><option value=''>-----</option><option value='omi'>omi</option></select></div>

 

In my block..

I want to add a onchange event with first select box,  which ID is 'akg'.

 when i changed the value in select box(ID=akg)  this is give me error , object expected.

i am declaring the method like this-

 de:function(){
   
    alert("de");
    }                  

can you help me,,    please tell me, how i can add onchange event with a select BOX

Thanks

 

Answer posted by Stanislav (support) on Jan 13, 2010 02:50
In which place of code you are declaring " de:function(){" ?
When you are using function name inside onchange method you need to use global names. So function must be declared on top level as

function de(){ ... }

or you need to use full name as

onchange='scheduler.form_blocks.some.de();'>