Announcement

Collapse
No announcement yet.

Refresh Button?

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

  • Refresh Button?

    Hi

    I usually use this code as java button in grid to refresh on demand and get latest available information from this grid SQL query

    Code:
    window.location.reload();
    history.go(0);
    window.location.href=window.location.href;
    But recently found out that is not refreshing correctly... I have gif image in the grid header, it does continue... while i want it to really "refresh" the whole page

    do you guys have any other idea or button code to use in grid in order to refresh everything correctly!?

  • #2
    In stead of javascript a button with: exit(sel) ?
    Albert Drent
    aducom software netherlands
    scriptcase partner, reseller, support and (turn-key) development
    www.scriptcase.eu / www.scriptcase.nl

    Comment


    • #3
      How to do that Albert? just put this code in a new button? i want a refresh button that really refreshes the gird/form

      Comment


      • #4
        Yes, create a new button and add this code. It will cause to restart your application, which - in effect - is a full refresh.
        Albert Drent
        aducom software netherlands
        scriptcase partner, reseller, support and (turn-key) development
        www.scriptcase.eu / www.scriptcase.nl

        Comment


        • #5
          The easy way: Grid / Settings / Refresh Interval ...
          Best regards: - Reinhard -

          I use ScriptCase 8 Enterprise Edition, Version 8.(latest)

          Comment


          • #6
            YES Albert, worked perfectly as Required Thanks dude

            sc_exit(sel);


            Thanks RHS too, I'm using that, but wanted extra button to refresh on demand


            Cheers

            Comment


            • #7
              hi,

              Be careful if you use global variables in the sql stmt.
              I use sc_exit(sel) in some button and I remember to had some problems.

              I remember something as that values of global variables is assigned once first time the application enter.
              If global variable change value during execution, the new value is not refreshed when sc_exit(sel) is executed.

              Regards

              JMiguel

              Comment


              • #8
                In that case you can do a sc_redir to the same application and set the global in the parameter list.
                Albert Drent
                aducom software netherlands
                scriptcase partner, reseller, support and (turn-key) development
                www.scriptcase.eu / www.scriptcase.nl

                Comment


                • #9
                  Hi I also need a refresh button for a Form application, I tried the sc_exit(sel) button and it does not do anything. and the
                  window.location.reload(); history.go(0); window.location.href=window.location.href; option just kicks me out of the application and goes back to the previous one.
                  what is the best way to set the refresh button in the application?

                  thanks

                  Comment


                  • #10
                    Originally posted by ingjfnc View Post
                    Hi I also need a refresh button for a Form application, I tried the sc_exit(sel) button and it does not do anything. and the
                    window.location.reload(); history.go(0); window.location.href=window.location.href; option just kicks me out of the application and goes back to the previous one.
                    what is the best way to set the refresh button in the application?

                    thanks
                    hello
                    that works with the form. use php button type and sc_exit(sel);

                    Comment


                    • #11
                      Why doesn't scriptcase add that button among toolbar buttons?

                      Comment


                      • #12
                        I have a different requirement. I need to refresh a different grid when the data is changed in another grid. I have a dashboard application with the 2 grids and one grid is filtered based on the selection in the other.
                        Is it possible to refresh the entire dashboard when the data is changed in one of the grids?

                        Comment


                        • #13
                          Clarification: the filtering app is a 'control' type application.

                          Comment

                          Working...
                          X