Announcement

Collapse
No announcement yet.

Close a blank application when it shows as a modal window

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

  • Close a blank application when it shows as a modal window

    dear SC Forum,

    does anyone here know how to close a blank application when it shows as a modal?
    AFAIK, blank application is a pure php file.
    i only need a single link or button which i can click to close the modal and back to the previous application.

    simply like that, but i don't have any idea. i've searched such this article here, but now can not be accessed (perhaps my internet trouble).
    here the code i found so far from this forum

    PHP Code:
    echo "<a href='#' onclick="parent.location='../app/app.php'" >Close</a>"
    error..doesn't work properly.
    i tried this also...only works when the blank application is open in another windows (not a modal).
    PHP Code:
    echo( "<a href=\"#\" onclick=\"window.close(); return false\">Close</a>"
    any idea?
    -Iwan P-

  • #2
    I'm not sure, but afaik you can use macro's. I would start with sc_exit. See helpdocumentation for that.
    Albert Drent
    aducom software netherlands
    scriptcase partner, reseller, support and (turn-key) development
    www.scriptcase.eu / www.scriptcase.nl

    Comment


    • #3
      i only have 1 even in a blank application, that's onExecute.
      if i use sc_exit(ref) in this event, should it be an auto close if it works? not a link or button which i can click to close the modal window?
      -Iwan P-

      Comment


      • #4
        Hello,

        Isn't the issue happening because you used double quotes instead of single quotes?

        echo "<a href='#' onclick='parent.location='../app/app.php'" >Close</a>";

        Comment


        • #5
          hi bartho

          i've tried with single and double quotes. basically, i need to know how to close the blank application and back to the previous application when blank application shows as a modal. just like other applications when it shows as a modal, they have button or link to close them.

          the blank application has only 1 event, onExecute. i searched through this forum and google, it's hard to find a simple example about this.

          would you give me a simple script or clue what should i do just to close the blank application and back to the previous grid or form? the blank application remains on top once it shows.
          -Iwan P-

          Comment


          • #6
            Hello,

            Have you tried to use sc_exit?

            http://downloads.scriptcase.com.br/d...sc.htm#sc_exit

            regards,
            Bernhard Bernsmann

            Comment


            • #7
              Hello,

              Have you tried to use sc_exit?

              http://downloads.scriptcase.com.br/d...sc.htm#sc_exit

              regards,
              Bernhard Bernsmann

              Comment


              • #8
                yes bernhard.

                i tried in the very beginning of the code like this below:
                PHP Code:
                sc_exit();
                //then the rest of code below 
                or like this:
                PHP Code:
                //the code above
                sc_exit(); 
                i put the sc_exit() in the onExecute event.

                both of them doesn't work. the blank application is working properly as a modal without the way to close unless i click other menu to load other application.
                -Iwan P-

                Comment


                • #9
                  Hello,

                  Please contact our support regarding this issue. Our chat is active on workdays from 8:00am to 6:00pm (GMT -3), and our ticket system is always available.

                  regards,
                  Bernhard Bernsmann

                  Comment


                  • #10
                    thanks bernhard.
                    i will create a ticket for this
                    -Iwan P-

                    Comment


                    • #11
                      If you get a valid reply, would you be so kind to put the answer here? I'm curious!
                      Albert Drent
                      aducom software netherlands
                      scriptcase partner, reseller, support and (turn-key) development
                      www.scriptcase.eu / www.scriptcase.nl

                      Comment


                      • #12
                        sure albert

                        i will update the solution once it solves the case.

                        this would be helpfull to a lot of developers which are using SC.
                        -Iwan P-

                        Comment


                        • #13
                          Hi,
                          did you try something like: echo "<a href='../form_sprecher_score/form_sprecher_score.php' target='_parent'>Return</a>";

                          Or if you don't need a user confirmation a simple sc_redir(yourform,,"_parent") will do it.

                          It works for me.

                          Cheers
                          jsb
                          Last edited by jsbinca; 05-15-2013, 09:25 AM.

                          Comment


                          • #14
                            thanks jsbinca.
                            i interest with sc_redir solution. would you mind if you give me 1 or 2 lines of example using sc_redir?
                            should i use in echo "sc_redir or just simply type sc_redir?
                            sc_redir will not give you a button or link for clickable to close the modal window.

                            do you mean sc_redir with <a href solution ?
                            -Iwan P-

                            Comment


                            • #15
                              if you get a response from support, please put it here in this forum is good to know that do for that.

                              Comment

                              Working...
                              X