Refresh dropdown when pop-up window is closed

1

In completing a form I created shortcuts to add data in dropdowns list but when I close the pop-up window, refresh the entire page.

  • I'm using the following code:

            window.onunload = refreshParent;         function refreshParent () {             window.opener.location.reload ();         }

The problem with updating the entire page is, it clears the data that I had already entered. in the remainder of the form. How do I just refresh on dropdown that we add data?

    
asked by anonymous 13.12.2016 / 12:34

1 answer

1

I think you're already talking about Ajax. An easy way to use Ajax is jQuery

You can use:

$.ajax({

accepts: {

mycustomtype: 'application/x-some-custom-type'

},

// Instructions for how to deserialize a 'mycustomtype'

converters: {

'text mycustomtype': function(result) {

// Do Stuff

return newresult;

}

},

// Expect a 'mycustomtype' back from server

dataType: 'mycustomtype'

});

link

    
13.12.2016 / 12:53