3 Replies Latest reply on Apr 8, 2010 12:11 PM by KenH

    File remains associated with original file in browser

    KenH

      Title

      File remains associated with original file in browser

      Post

      I have 3 files, Training.fp7, Schools.fp7, and StudentRes.fp7 created with Filemaker Pro 9, and published on a server with Filemaker Advanced Web Server V10.

       

      A button Training.fp7 performs a script on StudentRes to bring up a layout from StudentRes in the browser window.  This page contains 2 buttons:  Back to Training and Back to Schools, each of which performs a simple open on either Training or Schools.

       

      A strange problem occurs:

      - Click button on Training to get to StudentRes

      - Click the "Back to Schools" button on StudentRes to get to Schools

      - Cannot get back to Trainers start layout no matter what.

      - If I close the browser and specify the link that got me originally to Trainers, it still shows the Schools page as if it's cached.   The URL reflects the Trainers file URL, but the Schools page shows.

       

      Can anyone help resolve this problem ?

       

      Thanks!

       

       

        • 1. Re: File remains associated with original file in browser
          donjuancarlos_1

          If you are going to use the OPEN command and the file is already open, Filemaker just pulls up the last visited window of that file.

           

          You need to create a script for your "Back" buttons that includes a Go to layout command, if you want them to go to a particular layout every time.

           

          For example:

           

          Open Training.fp7

          Go to Layout: "Default"

          • 2. Re: File remains associated with original file in browser
            KenH

            donjuancarlos wrote:

            If you are going to use the OPEN command and the file is already open, Filemaker just pulls up the last visited window of that file.


            Good to know!   Filemaker pulls up the last visited window from another file (Students) navigated to via the orginal Trainings file access.

             

            Here is what my scripts do:


            Trainers.fp7

            - click button executes a SearchStudents script from Students file:

                $ Select Window [Current Window]

                $ Go to Layout ["searchName"(Students)]

                $ Show/Hide Status Area [Lock;Hide]

                $ Enter Find Mode [Pause]

             

            In the Students layout are 2 buttons:  Back to Trainers and Back to Schools.
            Back to Trainers works fine. 

            Back to Schools works, but remains "attached" relative to the Trainers file and shows when accessing Trainers file again - this is the problem.   The problem goes away after the session times out when the file is presumably closed.

             

            Students.fp7 Back to Schools button script:

              $ Perform Script ["Open" from file: "Schools"]

              $ Select Window [Name: "Schools"]

              $ Close File [Current File]

             

            Schools Open Script:

              $ Select Window [Name: "Schools"]

              $ Go to Layout ["Schools"]

              $ Show/Hide Status Area [Lock;Hide]

             

            I tried creating a script in Trainings to execute the SearchStudents script followed by Close File [Trainings], but 1) I had the same problem, and 2) I'm not sure if the script needs to complete before control is returned to execute the next line (close file).

             

            Thanks,
            Ken

             


            • 3. Re: File remains associated with original file in browser
              KenH

              donjuancarlos wrote:

              If you are going to use the OPEN command and the file is already open, Filemaker just pulls up the last visited window of that file.


              If using an explicit OPEN or CLOSE FILE is not an option since they are not web compatible, then you cannot close the file and the file remains open.  If the file remains open, then how do you work around the issue where Filemaker remembers the last visited window of that file ?    In my case, the last visited window is from another file that happened to be reached through button based navigation.  I need to be able to go to the original file and desired layout of the original file through the web browser.

               

              Any ideas ??