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

  • #16
    yes alvagar

    i already get 1 respon as solution.
    still trying out now and will post here once it works propely closing the modal window
    -Iwan P-

    Comment


    • #17
      Hi ivanpc,
      it depends on your needs. When I want the user to actively close the window I put a link at the end of the page:

      echo "<a href='../form_score2/form_scores.php' target='_parent'>Click here to return</a>"; //(of course with a little formatting or image)

      In case I don't need the user to interact, I just put a simple redirect to the parent at the end of the script.

      sc_redir(form_scores,,"_parent");

      That's it
      jsb

      Comment


      • #18
        idea for closing blank app as a modal

        hi guys,

        i got this from SC support. it's a good idea. here is the code i get from SC support:
        Code:
        ?>
        
        <script>
        	
        	function voltar()
        	{
        		window.parent.back()
        	}
        </script>	
        
        <center><input type = "button" name = "btn_return" value = "Return" onClick = 'Javascript:voltar();'></center>
        
        <?php
        but it doesn't work. it shows the button, but it doesn't close the window.
        Attached Files
        -Iwan P-

        Comment


        • #19
          I've been patiently waiting for this solution. Looks like you might need the code from the voltar function to create a javascript method, which is being called in the sample code you gave. How did support send you this half-working solution? Contact them through the same channels and see if they can give you the javascript method code. I NEED this too

          Comment


          • #20
            give up guys...
            i think for this moment, it is impossible for us to close a blank app when it shows as modal.
            no solution from the tech support, unless suggesting me to open in a new window (this works....i tried many times before i searched about this).

            that's the official reply. so i better stay, waiting for the next update, perhaps SC will add some feature about "closing a blank app when it shows as a modal".
            -Iwan P-

            Comment


            • #21
              This is quite annoying when nothing is ever done. What's the point if tech support ignores the dev users?
              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


              • #22
                in every framework, there will be some missing points.
                i have tried my best and it's not available today. perhaps with this thread, they will add this feature in the next release.

                *i sent this suggestion to netmake, hoping they will hear this simple suggestion.
                -Iwan P-

                Comment


                • #23
                  Indeed! There's nothing wrong with missing features, that's what new versions are about. But it's hard to find out which suggestions are taken into account and which not.
                  Albert Drent
                  aducom software netherlands
                  scriptcase partner, reseller, support and (turn-key) development
                  www.scriptcase.eu / www.scriptcase.nl

                  Comment


                  • #24
                    Hi. I have exact same problem. I have a page of info generated in a blank app, opened on top of a form using a button as link, but now there is no X to close the modal

                    How was this resolved? Did SC every change for SC V7 or not?

                    I did just try this and it closes it OK, by reloading the original underlying app:

                    ?>
                    <a href="../move_thru_order_days/move_thru_order_days.php" target='_parent' style='text-decoration: none;' ><button style='background-color: #2F5BB7; color: white;' >Return to OrderingClose</button></a>
                    <?php
                    This is SC V6

                    This definitely works. Using the target as _parent got me back far enough into the frame of the menu. I have also used the iframe NAME (not ID) as target elsewhere in my code, and that works as well.


                    Peace
                    Last edited by onmountain; 07-26-2013, 12:36 AM.

                    Comment


                    • #25
                      Hi,
                      just an update. Figured that SC using Thickbox for the modal window, so all you have to do is:

                      echo "<script>window.parent.tb_remove();</script>";

                      at the end of your script. Done!

                      Later on
                      jsb

                      Comment


                      • #26
                        a real solution from jsbinca

                        hi jsbinca,

                        what should i say? you are a genius.
                        your script echo "<script>window.parent.tb_remove();</script>"; is working for auto close the form if it is placed in the bottom of the code in a blank application (at the end of the script).

                        so i modify (combine with the previous solution from the SC technical support) like this:
                        ?>

                        <script>

                        function CloseModal()
                        {
                        window.parent.tb_remove();
                        }
                        </script>

                        <center><input type = "button" name = "btn_return" value = "Close" onClick = 'Javascript:CloseModal();'></center>

                        <?php

                        i paste this code, let's say in the middle or top of the script, then it's completely working. now i have a button to close a blank application when it's shown as a modal.

                        *ladies & gentlemen, now we have a good solution thanks to jsbinca

                        many thanks, jsbinca
                        -Iwan P-

                        Comment

                        Working...
                        X