Question regarding working inside jQuery plugin popModal

I am using jquery popModal in my javascript code as follows:

I can see the following based on my code:

  1. When I click on Cancel button the modal window gets closed which is because inside Cancel function, I have $(this).dialog("close") defined.
  2. Pressing Save button doesn’t closes which is obvious from the fact that $(this).dialog("close") is commented out in my code below.
  3. Pressing Remove is also closing the dialog and it’s not printing the console messages.

Could anyone tell me why it is behaving like this and how can I make the url print in the console.log?

Here is my code:

  if (selectedField === "edit") {
                    html: $('#modalDialog').html()
                    position: { my: 'center', at: 'center' },
                    modal: true,
                    width: 350,
                    height: 150,
                    buttons: {
                        Cancel: function () {
                        Save: function () {

                           /* $(this).dialog("close")*/
                        Remove: function () {

                                var url = ""; 

                                console.log("Checking URL inside REMOVE Button: "+url);

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.