jquery - Identifying child window closure, close property changing -


i'm trying detect when child window closed. user opens pop , closes pop up. want know when pop closed. seems common solution problem put timer on window question has been answered in multiple places on stackoverflow , elsewhere on web.

my problem changing close property on child window , not user closing window. causing this?

here code (by way, know , should double ampersand, reason not letting me post them there):

var childwindow = window.open(desturl, "thepopup", ""); var count = 1; var polltimer = window.setinterval(function () {         alert(childwindow.closed.tostring() + count.tostring());         if (childwindow && childwindow.closed && count > 5) {             window.clearinterval(polltimer);             handler();         }         count++;     }, 200); 

this not working put alert in there try see going on. alerts display following messages:
false1
true2
true3
true4
true5

so somewhere between 1 , 2 value of closed property changing false true. i'm not doing , window still open. why change false true?

it appear issue acrobat plugin ie.

when opening standard webpage, code have posted works expected. using url of pdf, however, produces different results in different browsers.

in chrome, uses it's own rendering system pdfs, code works expected. in ie8, however, pdf viewer plugin appears report page closed.

i have been unable find workaround of yet.

attempts have included defining closure childwindow.onunload , childwindow.onbeforeunload. in chrome, these trigger closure function before window closed.

check childwindow.closed: fiddle, for viewing in ie

closure: fiddle, for viewing in ie


Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -