Announcement

Collapse
No announcement yet.

message confirm before insert, update, delete

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

  • message confirm before insert, update, delete

    hi,
    i can add a message in a scriptcase standard buttons before confirm any actions(update, insert, delete) without having to create new buttons?

  • #2
    Re: message confirm before insert, update, delete

    sc_confirm() in code should help?

    place it before the code that will perform the action you mention.

    Regards,
    Scott.

    Comment


    • #3
      Re: message confirm before insert, update, delete

      hi scott

      To use sc_confim () must create a new button, you can not use it on those standards scriptcase button

      Comment


      • #4
        Re: message confirm before insert, update, delete

        maybe you can use the onBeforeInsert/update/delete events?

        Comment


        • #5
          Re: message confirm before insert, update, delete

          I agree with Freezer, just use standard PHP call in your code for this and bypass sc macro.

          Regards,
          Scott.

          Comment


          • #6
            Re: message confirm before insert, update, delete

            You can post the sample code?

            thanks

            Comment


            • #7
              Re: message confirm before insert, update, delete

              You will have to actually use JS, as PHP is server side only. sc_confirm is a JS call to the client.

              google: javascript confirm

              Regards,
              Scott.

              Comment


              • #8
                Re: message confirm before insert, update, delete

                I wrote in the tips section on purpose to make this easier

                marcov

                Comment


                • #9
                  Re: message confirm before insert, update, delete

                  Hi,,
                  Finally,
                  Whats the solution.

                  Thanks

                  Regards,
                  ghulma
                  Regards,
                  Ghulma

                  Comment


                  • #10
                    Yeah, again, after 3 or more years, anybody has sample code to manage this issue? sc_confim??

                    Comment


                    • #11
                      can you not just use the built in settings for the form:

                      It's under: Application | Settings | Messages

                      Comment


                      • #12
                        Originally posted by adz1111 View Post
                        can you not just use the built in settings for the form:

                        It's under: Application | Settings | Messages
                        Yeh quite certain that was what he was after. Seems easy just a bit hard to find if you don't know where to look i guess.

                        Comment


                        • #13
                          I know that boss, that works in all cases. I want it conditional to show the message if one of the fields has an exact value only. Please hint up if u have an idea in mind.

                          Comment


                          • #14
                            Oh right, you wanted a condtition check before the confirmation triggered. Well I'm going to go ahead and assume that there's no easy way to do this at the moment, might want to ask NetMake whether they'd want to implement this. Although we all know how that goes...

                            Comment


                            • #15
                              Mike,

                              I was answering the poster's question which didn't say anything about conditional checks... :-)

                              However, the problem for conditional checking is that the dialog is normally JS, i.e. client-side which you want to PHP (server-side) to handle.

                              Until SC offer something built-in - one way around this is to create a control form to be a generic dialog box - it just has a couple of fields that basically display whatever message / question you set when you call it. It also has buttons that just set a global_var to indicate a choice made, which you pass back to the calling app. If you are building it be used in multiple situations, then the dialog app will need to keep track of the app that called it, so it can redir back to it.

                              Definitely fiddly, but can be written to be largely re-usable.

                              Comment

                              Working...
                              X