Announcement

Collapse
No announcement yet.

How to Refresh Detail Form in Master Derail Application.

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

  • How to Refresh Detail Form in Master Derail Application.

    I have a Master Detail Application , When i OnBlur from particular field then i am inserting some data in Detail form, I just want to know how to auto refresh detail form when i am moving out from particular field.



  • #2
    I had a similar problem at one point. I did not find a way to refresh the detail form as such, but found an acceptable solution for my application: Doing a refresh on the master application using the sc_redir macro to call it again (i.e. from itself). As for for the detail form, I just made sure that the block (in the main application) containing it was defined to be started open -- specified under Layout->Blocks, "Collapse" column. Thus when the main form was reopened, the detail form would show new data right away.

    Perhaps this could work for you to.
    Best regards,

    Frank

    Comment


    • #3
      You can use JavaScript and force the detail iframe to reload
      /Giuseppe
      Professional Scriptcase Services
      Support/Outsourcing/Mentoring for projects migration to Cuba-Platform

      Comment


      • #4
        Originally posted by Giu View Post
        You can use JavaScript and force the detail iframe to reload
        Interesting!
        If an action in the master application updates the database table that is the basis of the detail form (e.g. an editable grid view with several lines), will such an iframe reload really get new data in the table in the database to show in the detail form?
        Best regards,

        Frank

        Comment


        • #5
          i am not finding proper solution for this issue. i am temporarily using auto refresh the detail form using HTML code in onLoad Event.

          <meta http-equiv="refresh" content="5"/>

          My detail form auto refresh every 5 seconds. I think this is not the proper solution.

          Thanks Giu please share with me the JavaScript code for reloading the detail block. it is quite urgent for me.


          Regards.


          Comment


          • #6
            Originally posted by Orion View Post

            Interesting!
            If an action in the master application updates the database table that is the basis of the detail form (e.g. an editable grid view with several lines), will such an iframe reload really get new data in the table in the database to show in the detail form?
            It should. Reload the iframe means to select against database.

            Amit, if I get time I will do it
            /Giuseppe
            Professional Scriptcase Services
            Support/Outsourcing/Mentoring for projects migration to Cuba-Platform

            Comment


            • #7
              @Giu Thanks

              Comment


              • #8
                AmitGK

                /Giuseppe
                Professional Scriptcase Services
                Support/Outsourcing/Mentoring for projects migration to Cuba-Platform

                Comment


                • #9
                  @Giu

                  Thank you so much that you took so much initiative to prepare this video, Its really a great help from your side for me.
                  I feel many people will be benefited by your video.

                  Thanks

                  Regards

                  Comment


                  • #10
                    @Giu

                    Great video.
                    Very useful when things don't work, to see how you fix it.
                    Thanks!

                    Comment


                    • #11
                      Hi,
                      I'm using the technique in Giu's excellent video to reload the detail iframe in SC9 when I change a dropdown on the master with linked value, but the detail form does not reload data from the database.

                      Dropdown (select) is on field ID in master form. ID is linked to SUBCAT_ID on detail form.

                      My AJAX php code in OnChange event in dropdown:
                      sc_ajax_javascript('refresh_iframe');

                      The refresh_iframe javascript function:
                      document.getElementById('nmsc_iframe_liga_form_dbo _ITEM').contentDocument.location.reload(true);

                      The subform seems to reload, but the data is not refreshed. I also check in database, SC is not requerying the database.

                      Comment


                      • #12
                        I have a need to refresh the header of the form.

                        I use sc_label to modify the detail header on load. However, when I modify detail data,the header is refreshed and I lose my changes.
                        I need either to prevent the header refresh, or find a way to redo my changes but I dont know where to place that code

                        Comment


                        • #13
                          i think when you refresh the header takes the original value of the title header.

                          Maybe when you use a global variable to define the header. So onLoad change the global to the desired value and SC will takes the value of the global. Haven't tried it but i guess it should work.

                          onload:
                          HTML Code:
                          [glo_header_title] = 'modified title';

                          Comment

                          Working...
                          X