CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> Archive -> CodeChargeStudio.Discussion

 Easy way to check for change before leaving page

Print topic Send  topic

Author Message
Bon733
Posted: 09/22/2003, 7:58 AM

Does anyone know a quick way to check for database changes on a page and
then prompt the user to save when leaving the page without hitting the
submit button?

DonB
Posted: 09/22/2003, 11:58 AM

Declare a variable on the client side that is set "true" by the OnChange
event of any control you want to monitor. Then some javascript in the
<BODY> tag to implement the onbeforeunload event to check the variable and
intercept the unload - using the alert() function to warn the user. Check
the scripting sites - there are a number of examples of this floating
around. I have a few of these sites bookmarked on my site which should get
you a solution.

--
DonB

http://www.gotodon.com/ccbth



Karim
Posted: 09/26/2003, 2:30 PM

DonB,
Could you be more speific in the location. Thanks,

Karim

"DonB" <~ccbth~@gotodon.com> wrote in message
news:bkngo7$mmg$1@news.codecharge.com...
> Declare a variable on the client side that is set "true" by the OnChange
> event of any control you want to monitor. Then some javascript in the
> <BODY> tag to implement the onbeforeunload event to check the variable and
> intercept the unload - using the alert() function to warn the user. Check
> the scripting sites - there are a number of examples of this floating
> around. I have a few of these sites bookmarked on my site which should
get
> you a solution.
>
> --
> DonB
>
> http://www.gotodon.com/ccbth
>
>
>
>

DonB
Posted: 09/26/2003, 3:34 PM

Go to the URL in my sig and look under "TECHlinks" (click the arrow to see
the full list - there is only room for the most recent ones on the main
page). One pretty comprehensive source is Simplythebest

--
DonB

http://www.gotodon.com/ccbth


"Karim" <kkabbara@bu.edu> wrote in message
news:bl2b5a$8c4$1@news.codecharge.com...
> DonB,
> Could you be more speific in the location. Thanks,
>
> Karim


   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.