473,383 Members | 1,984 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

how do i register 'onUnload' script from a content page

Hi

here is my problem

i use master pages and content pages

i would like for some content page to register a script that will
trigger on the 'onUnload' of the web page


can it be done with clientscript.register ....

if so how ?

Thanks

Apr 21 '06 #1
2 4872
Sure,
you could do it as
<script>
window.onunload =whatevermethod;
</script>

Peter
--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"fredd00" wrote:
Hi

here is my problem

i use master pages and content pages

i would like for some content page to register a script that will
trigger on the 'onUnload' of the web page


can it be done with clientscript.register ....

if so how ?

Thanks

Apr 21 '06 #2
thanks

it's always the obvious stuff that you can't find the solutions too.

Apr 22 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Brian Vallelunga | last post by:
I'm working on an asp.net site and am trying to implement a popup help window. I want the window to close when the user advances to the next page in our application. The thing is, I'm doing this on...
6
by: kaeli | last post by:
Hey guys, This error occurs ONLY in Netscape 7.0. Not in 7.1. So, I think it's a bug. Buuuut... Has anyone had this problem or know of a fix? When attempting to have an onunload function...
10
by: bbcrock | last post by:
does anyone have sample code to display a pop up when a user leaves the site? I really don't want to use this technique, but the clients demand it. I'm thinking something like un body onunload,...
2
by: Rich | last post by:
Is there any way to get the same effect that the body tag onUnload creates. I need a script that will be placed in the body of the html that will open a new window when the parent is closed. The...
2
by: Kristoffer Arfvidson | last post by:
Ok, so a new question... Im building my page as dynamic as I can... meaning that I have basicly one aspx page that controls everything... so, I solved this by sending different variables to the...
5
by: feng | last post by:
I want to use onunload to capture user's action when he clicks on the "x" button to close the browser. Here is how I do this: <SCRIPT FOR="window" EVENT="onunload"> myScript(); </SCRIPT> ...
1
by: Laurent Bugnion | last post by:
Hi, I am trying to programatically add an "onunload" event handler to the "body" tag of an ASPX page. I am doing this from a Custom Control located on this page. To do this, I added...
7
by: AmitKu | last post by:
I'm trying to use RegisterStartupScript. I am making a call to it in Page_Load...and nothing shows up. Well that not's entirely true. Half the pages I've put it on do work properly, but the...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.