
Runner.pages.PageSettings.addPageEvent('appoitment',Runner.pages.constants.PAGE_ADD,"afterPageReady",function(pageObj,proxy,pageid,inlineRow,inlineObject){8var ctrl_type_id=Runner.getControl(pageid,'appoitment_service_type_id');var ctrl_service_id=Runner.getControl(pageid,'appoitment_service_service_id');var ctrl_provider_id=Runner.getControl(pageid,'appoitment_provider_provider_id');var ctrl_date=Runner.getControl(pageid,'appoitment_booking_datetime');var ctrl_from=Runner.getControl(pageid,'appoitment_datetime_from');var ctrl_satuts=Runner.getControl(pageid,'appoitment_satuts');var ctrl_client_name=Runner.getControl(pageid,'appoitment_client_name');var func=function(e){$.post("mylookup.php",{'date':ctrl_date.getValue(),'provider_id':ctrl_provider_id.getValue(),'type_id':ctrl_type_id.getValue(),'service_id':ctrl_service_id.getValue()},function(data){var sel=$("#value_appoitment_datetime_from_1");sel.empty();for(var i=0;i<data.length;i++){sel.append('<option value="'+data[i].id+'">'+data[i].desc+'</option>');}},"json");};ctrl_date.on('keyup',func);ctrl_date.on('keydown',func);ctrl_date.on('change',func);ctrl_type_id.on('change',func);ctrl_service_id.on('change',func);ctrl_provider_id.on('change',func);ctrl_service_id.on('change',func);;});