Click here to Skip to main content
15,887,386 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
->i am new to flash builder flex code
->here i need to show when user click back button (or) refresh page ,he need to get alert message LIKE "Are you sure you want to leave page"
->please suggest me solution with example code...plz dnt forget to explan step by step
if u know answer
i will be thankful lot if any one help me
my number 9900002561
my mail tbsr001@gmail.com
Posted

1 solution

Have a look at JavaScripts onbeforeunload function.

A good explanation can be found in this article Back to Basics – OnBeforeUnload Event[^]

Example usage:
JavaScript
window.onbeforeunload = function(e) {
  return 'Are you sure you want to leave page';
};


... hope it helps.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900