I am writing a CRUD in MVC. when the user clicks on add new to add a new row in the grid. I am trying to show a form in a pop up window. below is my code:
function PopupForm(url) {
debugger;
var formDiv = $('<div/>');
$.get(url)
.done(function (response) {
formDiv.html(response);
Popup = formDiv.dialog({
autoOpen: true,
resizable: false,
title: 'Fill Student Details',
height: 500,
width: 700,
close: function () {
Popup.dialog('destroy').remove();
}
});
});
}
I checked the url and if I type the url directly in the browser, I can see the addnew form. In the debug mode, I can see error at : formDiv.dialog(). below is the image of the error:
I also looked in the browser after clicking on addnew and pressing F12 developers tool. below is the screen shot:
I am not sure where am I making the mistake. Below is the scripts folder image in my application and also, the layout page will all the script tags:
Any help will be greatly appreciated.
I already looked at these URL's, but my issue is different:
https://stackoverflow.com/questions/52298691/getting-typeerror-caller-callee-and-arguments-properties-may-not-be-acc
https://stackoverflow.com/questions/58675600/getting-caller-callee-and-arguments-properties-may-not-be-accessed-on-st