I am having an issue with the jquery autocomplete showing behind the Bootbox.dialog I show the bootbox.dialog in the schedulinging.js then in the partial i attach my autocomplete to the control on the view. I have been reading not to use a Z-index with Jquery 1.10 but not sure how to get the autocomplete in the dom in the right position after the dialog. I couldnt get the Z-index to work anyways. Need some help getting this to work. Thanks!
bootbox.dialog({
message: result,
buttons: {
save: {
label: "Save",
className: "btn-primary btn-xs",
callback: function () {
var $form = $('#form');
//Validating the form using unobtrusive validation.
$.validator.unobtrusive.parse($form);
$("#form").validate();
if ($("#form").valid()) {
$.ajax({
cache: false,
$('#ScheduleItem_AdditionalDescription').autocomplete({
source: function (request, response) {
var searchTerm = $('#ScheduleItem_AdditionalDescription').val();
//Ajax call to retrieve the potiential auto complate results
//based on the searchTemer that are passed in through the additional
//description control.
window.suppressBlockUI = true;
$.ajax({
url: "/ScheduleDetail/AutoCompleteAdditionalDesc",
dataType: "json",
contentType: 'application/json, charset=utf-8',
data: {
term: searchTerm
},
success: function (data) {
window.suppressBlockUI = false;
response($.map(data, function (item) {
return {
label: item.AdditionalDescription
//,
//value: item
};
}));
}
});
}, minLength: 1,
select: function (event, ui) {
},
open: function () {
$(this).removeClass("ui-corner-all").addClass("ui-corner-top");
},
close: function () {
$(this).removeClass("ui-corner-top").addClass("ui-corner-all");
}
});
set z-index property to 99999 so that It will come forward