Announcement

Collapse
No announcement yet.

sc_redir on Button "Save Selected "

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

  • sc_redir on Button "Save Selected "

    hello,
    i have a problem with redirection.
    I have a form with orientation - Multiple Records.
    I created an onAfterUpdate Event to redirect to annother form - working great, as long as i change at least one line.
    But if i do not change a line, the event is not fired.
    So what can i do to redirect to annother page even when no line has to be updated ?

    Is there a possibility to set the MARK ALL as standard ?
    Last edited by Gerd Dietrich; 07-16-2013, 03:44 AM.

  • #2
    One of the possibilities is to create a redirect buttton on the form for those cases where nothing has changed. If you make this button invisible in the onchange then that prevents confusion?
    Albert Drent
    aducom software netherlands
    scriptcase partner, reseller, support and (turn-key) development
    www.scriptcase.eu / www.scriptcase.nl

    Comment


    • #3
      I thought i could use something like:
      document.F1.sc_check_vert[].default.Checked = true;
      in an onLoad event, but this does not work !

      Comment


      • #4
        OnAfterUpdate is a php 'event' which is called after updating the table. Actually it isn't a real event, but a piece of code called after updating table. The initiation of the update can be done by Ajax, but it still is a php event. Setting properties in javascript doesn't necessarely trigger events. Just setting properties need to trigger an ajax event. You can create a field and assign an ajax onchange event and do something in your php. You can assign an ajax event on one of you database fields on the screen. But it still requires that the user does something. I know that there is an option check all for multiple select fields, but I don't know if it's there in a multiple records form. Couldn't find it.
        Albert Drent
        aducom software netherlands
        scriptcase partner, reseller, support and (turn-key) development
        www.scriptcase.eu / www.scriptcase.nl

        Comment


        • #5
          Albert,
          i do not Need the Option check for all selected fields, mark one is enough !
          Problem is as you said, itīs possible that the user did not Change any value, but then i have no Chance to get the Redirect working !

          Comment


          • #6
            Originally posted by Gerd Dietrich View Post
            Albert,
            i do not Need the Option check for all selected fields, mark one is enough !
            Problem is as you said, itīs possible that the user did not Change any value, but then i have no Chance to get the Redirect working !
            Not without some action of the user, no.
            Albert Drent
            aducom software netherlands
            scriptcase partner, reseller, support and (turn-key) development
            www.scriptcase.eu / www.scriptcase.nl

            Comment


            • #7
              Originally posted by aducom View Post
              Not without some action of the user, no.
              the user has an Action: "Save Selected" , but as he did not change a value, nothing is selected.

              at which time are the onValidate Processes fired ?

              Comment


              • #8
                Originally posted by Gerd Dietrich View Post
                the user has an Action: "Save Selected" , but as he did not change a value, nothing is selected.

                at which time are the onValidate Processes fired ?
                Only when the save button is used while in update or new mode. Regarding the action, is that a button, a link or...?
                Albert Drent
                aducom software netherlands
                scriptcase partner, reseller, support and (turn-key) development
                www.scriptcase.eu / www.scriptcase.nl

                Comment


                • #9
                  Itīs a standard button from SC

                  No one annother idea ?
                  Last edited by Gerd Dietrich; 07-19-2013, 04:50 AM.

                  Comment


                  • #10
                    Still having the problem !
                    No one here, who could help me in any way ?

                    Comment


                    • #11
                      Hello,

                      Do you want to redirect a user to another page when he clicks on "save" regardless of any record being updated or not?

                      You could try to "grab" the internal function that is called when you click on "save" which I believe is something like nm_atualiza(), create a new button that implements nm_atualiza() and then redirect to another form after nm_atualiza() is called.

                      I'm not saying this will definitely work, but it is an idea!

                      regards,
                      Bernhard Bernsmann

                      Comment

                      Working...
                      X