ajax - pop up window not closing -


i have popup window should close during submit.but not closing data adding in grid. script used

$(document).ready(function(){     $("#dialog-form").dialog({         autoopen : false,         height : 400,         width : 700,         modal : true,         title: "currency details",         close : function() {             $(this).dialog("close");         }     });  }); 

and ajaxsubmit

function savecurrencyajax() {         var str = $("#enumcurrency").serialize();         $.ajax({             type : "post",             url : "../currency/saveenumcurrency.action",             data : str,             success : function(response) {                 $('#dialog-form').dialog('close');              },             error : function(e) {                 alert('error: ' + e);             }         });     }; 

this controller

  @requestmapping( value="/currency/saveenumcurrency.action", method=requestmethod.post)         public modelandview saveenumcurrency(@modelattribute enumcurrency enumcurrency, errors errors) throws exception {                 modelandview mvc = null;             try{                 list<enumcurrency> enumcurrencys =  new arraylist<enumcurrency>();                 enumcurrencys.add(enumcurrency);                 list<enumcurrency> enumcurrencyslist = enumcurrencyservice.create(enumcurrencys);                 mvc =   new modelandview("setup/enumcurrencylist");               } catch (exception e) {                 e.printstacktrace();             }             return mvc;          } 

thanks in advance, if need more information inform me.

first confirm whether coming success function ! , try

$('div#popup_content').bind('dialogclose', function(event) {      alert('closed');  }); 

refer - accepted answer of question

just try


Comments

Popular posts from this blog

Detect support for Shoutcast ICY MP3 without navigator.userAgent in Firefox? -

web - SVG not rendering properly in Firefox -

java - JavaFX 2 slider labelFormatter not being used -