3 Replies Latest reply on May 10, 2013 6:47 AM by philmodjunk

    Get Web content

    pdoak_1

      Title

      Get Web content

      Post

           I am using Filemaker Pro 12.0v4 on a mac running 10.8.3.

           I have a layout with a web viewer object on the page with the following url:

            

           

                "http://uk.finance.yahoo.com/q?s="dtv&ql=1"

           I am trying to retrieve the html content of the page using GetLayoutObjectAttribute("objectName; "content") where object name is the name of the object.

            

           However, if I try and set  the variable $content=GetLayoutObjectAttribute("objectName; "content"), it retrieves nothing. If I set the web page to Google Maps say and use the same code, it retrieves the html content. I don't think there is anything strange about the "http://uk.finance.yahoo.com/q?s="dtv&ql=1" but I just can't seem to get it to work. Does anyone have any clues?

            

            

        • 1. Re: Get Web content
          philmodjunk

               Do you wait for the web page to fully load in the web viewer before attempting to captuer the content?

               Have you tried using Insert From URL--which does not require a web viewer or the getlayoutobjectAttribute function?

          • 2. Re: Get Web content
            pdoak_1

                 Thanks Phil.

                 You were right, the page just takes a long time to fully load. What I was trying to do was test that the page had loaded by searching for the string </html> but that seems to take a long time even though the page is visible within the web viewer. I can get around it by just putting a pause into the script so that it becomes visible on screen. 

                 Are there any other work arounds?

            • 3. Re: Get Web content
              philmodjunk

                   To Repeat from last post: Have you tried using Insert From URL--which does not require a web viewer or the getlayoutobjectAttribute function?

                   This is a new script step added to FileMaker 12. Like all insert script steps, the target field must be present and enabled for Browse Mode access in order for this to work.