javascript - workaround of Chrome 37+ modal dialog returnValue -
javascript - workaround of Chrome 37+ modal dialog returnValue -
i have parent caller page , modal page, when modal page closed, caller page gets returnvalue popup modal page. older version chrome's showmodaldialog()
returns undefined, there many workarounds [javascript - showmodaldialog not returning value in chrome.
but window.showmodaldialog() in chrome37+ deprecated design [http://blog.chromium.org/2014/07/disabling-showmodaldialog.html], workarounds returnvalue of popup window not work anymore.
than tried window.open()
, window.open deed quite differently showmodaldialog
, , not easy right returnvalue (since window.open()
asynchronous).
so there perfect way solve this?
you can utilize jquery modal dialog framework
jquery modal dialog example
$( ".selector" ).dialog({ close: function( event, ui ) { alert('dialog closed'); return; } });
or fancybox framework
fancybox example
$(".fancybox").fancybox({ afterclose : function() { alert('dialog closed'); return; } });
both frameworks provide callback handlers can store or pass values other functions...
javascript jquery google-chrome modal-dialog
Comments
Post a Comment