jQuery UI Dialog Error: b("<div></div>").addClass("ui-widget-overlay") is undefined
- by Mithun
I have the below code for my a Dialog box for a which contains a dropdown field
KPMS.ServiceRequests.Status = {
showOptions : function(requestId, userId, requestType) {
var url = BASE_URL+'service_requests/status_options/';
$("#dialog-modal").dialog("destroy");
$("#dialog-modal").load(url, {"request_id": requestId, "user_id": userId, "request_type":requestType}).dialog(
{
modal: true,
title: "Update Status",
buttons: {
Cancel : function() {
$(this).dialog('close');
},
Update: function() {
alert(1);
}
}
}
);
}
}
There is an anchor tag to populate the Dialog
<a onclick="KPMS.ServiceRequests.Status.showOptions(9, 11, 'SR'); return false;" title="Update status" href="http://localhost/kitco/pms/#9"><img alt="[E]" title="Update" src="http://localhost/kitco/pms/images/edit.png"></a>
My problem is When i click the link for the first time the dialog box is populating properly.
Then I closed the dialog using the cancel button, then again clicked the link to open the dialog and closed it.
For the third click on the link I'm getting the below Javascript error, and Dialog box is not opened
Error: b("<div></div>").addClass("ui-widget-overlay") is undefined
Source File: http://localhost/kitco/pms/js/jquery-ui-1.8rc3.custom.min.js
Line: 199
How to solve this problem?