That's client side onunload and basically from client-side of view when you
do a postback, you unload the current page and load a new one.
Per MSDN's documentation following actions cause onunload to fire
a.. Close the current browser window.
b.. Navigate to another location by entering a new address or selecting a
Favorite.
c.. Click the Back, Forward, Refresh, or Home button.
d.. Click on an anchor that refers the browser to another Web page.
e.. Invoke the anchor click method.
f.. Invoke the document write method.
g.. Invoke the document open method.
h.. Invoke the document close method.
i.. Invoke the window close method.
j.. Invoke the window open method, providing the possible value _self for
the window name.
k.. Invoke the window navigate or NavigateAndFind method.
l.. Invoke the location replace method.
m.. Invoke the location reload method.
n.. Specify a new value for the location href property.
o.. Submit a form to the address specified in the ACTION attribute via the
INPUT type=submit control, or invoke the submit method.
--
Teemu Keiski
ASP.NET MVP, AspInsider
Finland, EU
http://blogs.aspadvice.com/joteke
"mgonzales3 " <mg********@dis cussions.micros oft.comwrote in message
news:E2******** *************** ***********@mic rosoft.com...
>I have a popup that does a postback to populate a listbox. on my content
page I want to fire a jscript that will refresh the parent on the unload.
the
code on the content page looks like this.
<script>
function refreshParent()
{
window.opener.l ocation.href = window.opener.l ocation.href;
if (window.opener. progressWindow)
window.opener.p rogressWindow.c lose();
window.close();
}
</script>
<body onunload="refre shParent()">
Why does the event fire if all i'm doing is doing a search postback?
ideas?
thanks