473,406 Members | 2,698 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,406 software developers and data experts.

Page change

Guys, does anybody know how to catch the event when the page is changing? We
created a simple editor on the aspx page for our clients, but if somebody
wants to leave this page immediately he need to push the button to save all
data. It's not very convenient and we'd like to implement something more
powerful to save the page data before a next page is shown.

Any idea? Can we use for example meta tags, java scripts, or whatever to
write that?

The second question is harder - if the user wants to close the IE at the
client side can we catch that and send something to the server side
including the latest data, the logout info, etc.? Is it possible at all?

Thanks,
Dmitri.
Nov 19 '05 #1
2 1298
Your best bet is to use the onUnload javascript event:
http://msdn.microsoft.com/workshop/a...s/onunload.asp

Some more links:
http://www.4guysfromrolla.com/webtech/100604-1.shtml <-- most important
http://www.gadgetopia.com/2004/06/18...urChanges.html

Karl
--
MY ASP.Net tutorials
http://www.openmymind.net/ - New and Improved (yes, the popup is annoying)
http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
come!)

"Just D." <no@spam.please> wrote in message
news:9D65e.3797$k57.3063@fed1read07...
Guys, does anybody know how to catch the event when the page is changing? We created a simple editor on the aspx page for our clients, but if somebody
wants to leave this page immediately he need to push the button to save all data. It's not very convenient and we'd like to implement something more
powerful to save the page data before a next page is shown.

Any idea? Can we use for example meta tags, java scripts, or whatever to
write that?

The second question is harder - if the user wants to close the IE at the
client side can we catch that and send something to the server side
including the latest data, the logout info, etc.? Is it possible at all?

Thanks,
Dmitri.

Nov 19 '05 #2
Hi,

when I asked nearly the same question I got some answers that were
frustrating.
That is simply not a common web workflow to catch not saved data when
leaving the page by navigation or by closing the browser.

I tried to use the "OnBeforeUnload" event in the HTML body element. This can
call a client side JavaScript function. A server side function can not be
called this way :-(

By this you can catch even the browser closing.

Just try it...

Frank
"Just D." <no@spam.please> schrieb im Newsbeitrag
news:9D65e.3797$k57.3063@fed1read07...
Guys, does anybody know how to catch the event when the page is changing?
We created a simple editor on the aspx page for our clients, but if
somebody wants to leave this page immediately he need to push the button
to save all data. It's not very convenient and we'd like to implement
something more powerful to save the page data before a next page is shown.

Any idea? Can we use for example meta tags, java scripts, or whatever to
write that?

The second question is harder - if the user wants to close the IE at the
client side can we catch that and send something to the server side
including the latest data, the logout info, etc.? Is it possible at all?

Thanks,
Dmitri.

Nov 19 '05 #3

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

Similar topics

8
by: Michael G. Schneider | last post by:
With Windows 2003 Server... Imagine the following scenario: there is a simple ASP page, for example just a single Response.Write statement. There is a virtual directory pointing to the...
16
by: juglesh | last post by:
Hello, I need to look through the text on a page and replace certain words with an image or other word something like: read document find all instances of the word "blah" change all...
2
by: Pete | last post by:
I have some funky form/event behavior. Access 97. Split frontend/backend, using Access security. I have the same behavior (or lack of behavior) for the pag_Click() event of two separate pages...
2
by: Pete | last post by:
Hi all... I sincerly hope one of the MS guys can clear this up for me... First some background... Ok, I have a web site which is fully translatable into several languages. All the strings...
11
by: Jeff | last post by:
Hi - I'm trying to get my ASP.NET pages to work the same way on my development machine (running from the VS.NET IDE) and on a remote (3rd-party) server. The only way I've been able to come up...
13
by: tshad | last post by:
Is there a way to run a script or function on entry of each page without having to put a call in each page? Periodically, I find something I want to do each time a page is entered and I have to...
9
by: ad | last post by:
Hi, How can I dynamically change the MasterPager of a web page?
4
by: David Lozzi | last post by:
Howdy, I have my master page, and I would like to change the background CSS class per the content page. Only the home page has a different background style, all other pages are using the same. I...
4
by: UJ | last post by:
I have a page where the user can upload a video file. As you can guess, this may take a while. Is there a way I can change the session timeout for just this one page? I would also want to change...
9
by: Gummy | last post by:
Hello, I created a user control that has a ListBox and a RadioButtonList (and other stuff). The idea is that I put the user control on the ASPX page multiple times and each user control will...
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.