4 Replies Latest reply on Feb 11, 2015 1:40 PM by TSGal

    GetLayoutObjectAttribute ( {web viewer} ; "content") returns wrong (old/cached) value

    jcooper

      Summary

      GetLayoutObjectAttribute ( {web viewer} ; "content") returns wrong (old/cached) value

      Product

      FileMaker Pro

      Version

      13

      Operating system version

      Mac OS 10.9.5

      Description of the issue

      When calculating GetLayoutObjectAttribute ( {web viewer} ; "content") after changing pages within a web viewer, sometimes, but not always, an older page's content is returned.  The content returned does not display the page being displayed when the calculation is returned.

      Steps to reproduce the problem

      Create a web viewer name "webMain", set the page to any page that contains a link.

      create a script where a global variable or field is set to GetLayoutObjectAttribute ( "webMain" ; "content").

      run the script. observe the value returned.

      click a link in the page.

      run the script again.

      Expected result

      The value returned should be the content of whatever page had just been rendered.

      Actual result

      The value sometimes will be the same as what was returned previously while on the old page.

      Configuration information

      Tried waiting several seconds after clicking link but before running script.

      Tried refreshing record and reloading page.

      Inconsistent bug; unfortunately this does not happen every time; rough guess would be bout 40% of the time.

      Workaround

      working on it....

        • 1. Re: GetLayoutObjectAttribute ( {web viewer} ; "content") returns wrong (old/cached) value
          philmodjunk

          What method are you using to display the value of the global variable?

          Are you using a custom dialog or a "merge variable" on a layout?

          • 2. Re: GetLayoutObjectAttribute ( {web viewer} ; "content") returns wrong (old/cached) value
            TSGal

            jscooper:

            Thank you for your post.

            I am unable to replicate the issue.  Here are the steps I performed:

            1. I created a new table with a text field named "HTML".

            2. On the layout, I sized "HTML" text field to be several lines long.

            3. I added a Web Viewer to the right side of the layout, using the custom web address "http://www.filemaker.com".  I left the other values as default ("Allow interaction with web viewer content, Display progress bar, etc.).

            4. With the Web Viewer still selected, in Inspector -> Position, I named the Web Viewer "webMain".

            5. I created a button on the layout that performed the "Set Field" script step, using the "HTML" field with the calculation:
                 GetLayoutObjectAttribute ( "webMain" ; "content" )

            6. I went to Browse mode, added one record, clicked the button, and the results displayed in "HTML" text field.

            7. I clicked "Products" tab, clicked the button, and the results changed in "HTML" text field.

            8. I repeated step 7 with "Solutions" tab, "Products -> Demos", "Products -> What's New", "Solutions -> Consultants", etc.  I could not get the previous value to display in "HTML" text field.

            Let me know what I'm doing differently than you so I can replicate the issue.

            TSGal
            FileMaker, Inc
            .

            • 3. Re: GetLayoutObjectAttribute ( {web viewer} ; "content") returns wrong (old/cached) value
              jcooper

              Seems it's an issue with the one site I need to work with this.  Not sure what they're running as a server or what the deal is with how the pages are rendered, but it works fine for any website other than the one I need.

              Unfortunately, the page isn't mine; it's a timecard entry page for an accounting package (Clearview software's "InFocus"). Everything work fine in safari and other pages work fine in FileMaker. But THIS site seems to somehow make FMP "hang on" to the old content for a while.  I may ask the vendor what they use for a server (IIS/Ajure I think).  But it's the first site I've had give me trouble inside fmp since surveymonkey decided their multiple choice buttons wouldn't work in it.

              Think I'm stuck between two companies who probably don't know each other well enough to figure it out.  I'll see if I can find a workaround.

              Thanks,

              Jeff

              • 4. Re: GetLayoutObjectAttribute ( {web viewer} ; "content") returns wrong (old/cached) value
                TSGal

                jscooper:

                I discovered that if I click the button (that executes the Set Field step) before the new page finishes loading, there is no change.  Once the web page finishes loading, then the correct information is put into the "HTML" text field when I click the button.

                Is it possible that "InFocus" web page has not finished loading?

                TSGal
                FileMaker, Inc.