$("#dialog") Is not a function error
I want to pass a data(text) to the dialog.
Inside
- $(document).ready(function()
I have
- function openDialog() {
$("#dialog").dialog({
autoOpen: false,
resizable: false,
height: 180,
width: 350,
modal: true,
open: function(event, ui) {
var dialog = $("#dialog");
dialog.data = dialogText;
}
});
}
Then somewhere I call it
- afterSubmit: function(response, postdata) {
if (response.responseText != "") {
var userKey = JSON.parse(response.responseText).UserKey;
jQuery(gridSelector).jqGrid('setGridParam', { datatype: 'json' }).trigger('reloadGrid');
dialogText = userKey;
openDialog();
return [true, "OK"];
} else {
return [false, "error"];
}
},
However I get the $("#dialog") is not a function error.