So u must store the form values persistently
Use a database i.e. on Click of Start button, store the values in a database table, then on page load first
check if the values exist for the same user (u have to take care about weather use pressed the stop button or not)
then load the values
however, this requirement is not normal for web applications specially when users have to log in to a form
Altenrately you can play with reading and writing xml files, to store the form values
Usman Waheed
Marked as answer by Angie xu - MSFT on Dec 23, 2012 11:49 PM
Make use of onbeforeunload javascript event. Something like this..
<script language="JavaScript" type="text/javascript">
window.onbeforeunload = ExitLogic;
function ExitLogic()
{
//whatever processing you want to do here..
}
</script>
To send the entered data to server, you'll have to use some javascript AJAX, JSON or jQuery sneaky postbacks.
sat200787
Member
2 Points
4 Posts
Need Code to view active page if browser closed or system restarts...
Dec 14, 2012 08:27 PM|LINK
I have created a Project name called Time tracer.....
in that project.. i am having login page, Tracer form page, report page...
under tracer form page.. i am having textboxes, dropdown list, Start button & stop button..
user will enter details and they will clik start....
suddenly if the browser closed or system restarts.....
after that, once the user enter to that... i want to have the detail whatever the user gave.....
can anyone help me in that....
usman400
Contributor
3503 Points
721 Posts
Re: Need Code to view active page if browser closed or system restarts...
Dec 15, 2012 06:13 AM|LINK
So u must store the form values persistently
Use a database i.e. on Click of Start button, store the values in a database table, then on page load first
check if the values exist for the same user (u have to take care about weather use pressed the stop button or not)
then load the values
however, this requirement is not normal for web applications specially when users have to log in to a form
Altenrately you can play with reading and writing xml files, to store the form values
deepthoughts
Contributor
7288 Points
1051 Posts
Re: Need Code to view active page if browser closed or system restarts...
Dec 17, 2012 10:00 AM|LINK
Make use of onbeforeunload javascript event. Something like this..
<script language="JavaScript" type="text/javascript"> window.onbeforeunload = ExitLogic; function ExitLogic() { //whatever processing you want to do here.. } </script>To send the entered data to server, you'll have to use some javascript AJAX, JSON or jQuery sneaky postbacks.
Thanks.