Announcement

Collapse
No announcement yet.

Show warning when user exits/cancels form with unsaved changes

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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?

  • #2
    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.

    Comment


    • #3
      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.

      Comment


      • #4
        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.

        Comment


        • #5
          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 ....

          Comment


          • #6
            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.

            Comment


            • #7
              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.

              Comment


              • #8
                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_u...?topic=1128.15
                Code:
                var ans = confirm("Would you like to save your changes?");
                if(ans == true)
                {
                	nm_atualiza('alterar');
                }
                that is put inside a javascript button

                Comment


                • #9
                  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
                  -----------------------------------------
                  Arthur Klisiewicz
                  dATA POINT SOFTWARE
                  www.datapointsoftware.com

                  Comment

                  Working...
                  X