Show warning when user exits/cancels form with unsaved changes

Can this please be implemented? This should be in the product like it is in many other case tools.

Till then, is there an alternative?

Re: Show warning when user exits/cancels form with unsaved changes

you already asked this in the “Form” section. I had the same problem and came up with a fairly simple solution, the only thing you need to add, is the check for each field to see if there were changes or not. Or just don’t check, and make it so it prompts the user whenever they click the exit button. If you do that, it only ends up being a few lines of code.

Re: Show warning when user exits/cancels form with unsaved changes

your solutions work, but as a workaround. I think Netmake should integrate this functionality in the tool, that’s why I put this topic in the “suggestions” forum. Thanks anyway.

Re: Show warning when user exits/cancels form with unsaved changes

i see what you’re saying but in my solution, I actually call a “netmake” function that does what you want.

Re: Show warning when user exits/cancels form with unsaved changes

You mean a Netmake function and piece of code around it… and when you add or remove a field on the form you’ll have to change your code as well I guess?

I also work with CASE tool of Oracle Developer suite that has this function built in. I know other case tools also have it, scriptcase should as well …

Re: Show warning when user exits/cancels form with unsaved changes

if you added a check for each field to see if there was a change, then yes you need to change the code. however, the code i wrote was just a confirmation box, and then a netmake function. so even if you changed some fields, you wouldnt need to change the code. the function that is called, is the same as the function that is called when you click the update button.

Re: Show warning when user exits/cancels form with unsaved changes

That functionality is very neccesary in all proyects. i have the same problem. (all my applications) not only one.
Where can i find the code for i do that?

Alvaro Garcia.

Re: Show warning when user exits/cancels form with unsaved changes

the workaround is in the “Forms” section of this forum, link: http://www.scriptcase.net/forum_en_us/index.php?topic=1128.15

var ans = confirm("Would you like to save your changes?");
if(ans == true)
{
	nm_atualiza('alterar');
}

that is put inside a javascript button

vivid - I see bad habits ! Why not to write a code in pure English so you can exchange it with others and it is easy to understand to everybody ?
Arthur