Should a custom lightbox section be able to work with Jquery autocomplete?
I have a textfield throughout my app that uses it. I would like the same functionality that users enjoy in the lightbox; however, autocomplete will execute. Any ideas?
Here is an example. Also, everything else works fine in the scheduler, except autocomplete
scheduler.form_blocks["patients"] = {
render: function (sns) {
return "<div class='dhx_cal_ltext' style='height:40px;'><label for='ap'>Search: </label><input id='ap'> <a href='#' onclick=Smc.patientClear('ap');>clear</a></div>";
},
set_value: function (node, value, ev) {
node.childNodes[1].value = value || "";
},
get_value: function (node, ev) {
return node.childNodes[1].value;
},
focus: function (node) {
var a = node.childNodes[1]; a.select(); a.focus();
}
}
scheduler.config.lightbox.sections = [
{ name: 'patient', map_to: 'patient_name', type: 'patients' }
]
<script type="text/javascript">
$(document).ready(function () {
$( "#ap" ).autocomplete({
source: ["personA", "personB", "personC"]
});
});
</script>