Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Master Page lifecycle

Reply
Thread Tools

Master Page lifecycle

 
 
=?Utf-8?B?bWdvbnphbGVzMw==?=
Guest
Posts: n/a
 
      07-05-2006
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.location.href = window.opener.location.href;
if (window.opener.progressWindow)
window.opener.progressWindow.close();
window.close();
}
</script>

<body onunload="refreshParent()">

Why does the event fire if all i'm doing is doing a search postback?
ideas?

thanks

 
Reply With Quote
 
 
 
 
Teemu Keiski
Guest
Posts: n/a
 
      07-05-2006
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>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.location.href = window.opener.location.href;
> if (window.opener.progressWindow)
> window.opener.progressWindow.close();
> window.close();
> }
> </script>
>
> <body onunload="refreshParent()">
>
> Why does the event fire if all i'm doing is doing a search postback?
> ideas?
>
> thanks
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Setting the value of a Master page's control's property using a property of the Master page Nathan Sokalski ASP .Net 25 03-04-2010 03:42 AM
Lifecycle question regarding master pages =?Utf-8?B?ZHNvcnJlbGw=?= ASP .Net 2 09-14-2007 12:56 PM
Can a master page be built from another master page Zeba ASP .Net 1 02-22-2007 10:55 AM
Master Page Lifecycle (note) =?Utf-8?B?bWdvbnphbGVzMw==?= ASP .Net 0 07-05-2006 04:04 PM
seeking servlet "Master" keep getting "Master/servlet/Master" not found. Tomcat 5.0.25 Doug McCann Java 1 08-05-2004 09:16 PM



Advertisments