0

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:

enter image description here

I also looked in the browser after clicking on addnew and pressing F12 developers tool. below is the screen shot:

enter image description here

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:

enter image description here

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
Anjali
  • 2,540
  • 7
  • 37
  • 77
  • Looks like you have several issues. Appears you might be loading multiple versions of jquery.js and some of the paths to resource files are incorrect (404 error status) – charlietfl Sep 07 '20 at 19:48
  • I posted the image of my script folder and the scripts included in my layout page – Anjali Sep 07 '20 at 20:06
  • So jquery-1.12-4 is another version once `bundles/jquery` is loaded. Only need one.I don't know why you get a 404 for the others, path is wrong somehow. I don't know much about .NET. Seems to be looking for them in a directory "Content" though – charlietfl Sep 07 '20 at 20:09

0 Answers0