Announcement

Collapse
No announcement yet.

[S]Call a modal app from a form, and refresh the calling form after modal app closed?

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

  • [S]Call a modal app from a form, and refresh the calling form after modal app closed?

    Apologies - originally posted this in "discussion" in error - so duplicated it here - perhaps a moderator can delete the "discussion" version please? :-)

    ===================

    I have a form (single record) that has a button that calls a control app modally. When the modal app is closed I want the calling form to refresh to reflect that changes the modal app made. Everything works fine except for the refresh after closing. How can I achieve this?

    The button that calls the control app modally is a Link button.

    I have also tried using a PHP button (instead of a link button) with the following code:

    Code:
    sc_redir('contr_app',,'_modal');
    
    sc_redir('calling_form_app');
    That also doesn't work re the refresh. Firstly, the modal bit doesn't quite work; opens app but in a new browser window, and the main screen becomes just a menu and background with no app displayed. After after closing the "modal" form" it just closes leaving the blank main screen - so the redir to the calling app doesn't appear to happen.

    Any thoughts folks?

  • #2
    Originally posted by adz1111 View Post
    Apologies - originally posted this in "discussion" in error - so duplicated it here - perhaps a moderator can delete the "discussion" version please? :-)

    ===================

    I have a form (single record) that has a button that calls a control app modally. When the modal app is closed I want the calling form to refresh to reflect that changes the modal app made. Everything works fine except for the refresh after closing. How can I achieve this?

    The button that calls the control app modally is a Link button.

    I have also tried using a PHP button (instead of a link button) with the following code:

    Code:
    sc_redir('contr_app',,'_modal');
    
    sc_redir('calling_form_app');
    That also doesn't work re the refresh. Firstly, the modal bit doesn't quite work; opens app but in a new browser window, and the main screen becomes just a menu and background with no app displayed. After after closing the "modal" form" it just closes leaving the blank main screen - so the redir to the calling app doesn't appear to happen.

    Any thoughts folks?

    You cannot have any code execute after an sc_redir(). It is a one-way path. Consequently, the 2nd line will never be executed.

    You need to put the 'calling_form' as the exit app for the control form, that way it will get reloaded.

    Dave
    Dave Prue
    Code Whisperer
    Lahar International Corp
    www.lahar.net

    Comment


    • #3
      Thanks Dave.

      So obvious! Wood for the trees - but that definitely helped. It's not entirely what I'm after but I think I can get to where I need to be. So, much appreciated! Thanks

      Comment


      • #4
        Originally posted by daveprue View Post
        You cannot have any code execute after an sc_redir(). It is a one-way path. Consequently, the 2nd line will never be executed.

        You need to put the 'calling_form' as the exit app for the control form, that way it will get reloaded.

        Dave
        Thank you for the help Dave.

        was just a human error, hehe.

        Bye.
        Best regards,
        Thomas Soares.
        ScriptCase International.

        Email: t.soares@scriptcase.net
        Visit our Blog: http://www.scriptcase.net/blog/
        Visit out fan page: http://www.facebook.com/Scriptcase

        Comment

        Working...
        X