4 Replies Latest reply on Feb 26, 2016 5:07 PM by argasoft

    Browsing with Web Viewer

    argasoft

      Hi!

       

      For my price-list I wish to have photographs and manuals for the items.

       

      So I made a script that manages a popover with a web viewer that:

      - loads the Google image page with "http://www.google.it/search?" & "q=" & PriceList::ItemDescription & "&source=lnms&tbm=isch
      - a click on an image enlarges this (still in the web viewer) and I get the choice between "Go to page" and "View image" (sorry translated from Italian)
      - "View image" loaded *until yesterday* just the picture in the web viewer

      - with Moo_DownloadFile ( GetLayoutObjectAttribute ( "WebViewerName" ; "source" ) the file is downloaded to a Temp directory

      - with BE_MoveFile () it is moved to its final destination

       

      All OK until yesterday.
      This morning, the click on "View image" button causes the opening of a IE window (thus outside FM) showing the image.

      Can't find out what I have unintentionally changed.

       

      Thanks in advance for every hint.

      Arnaldo

        • 1. Re: Browsing with Web Viewer
          TSGal

          argasoft:

           

          Thank you for your post.

           

          What is the image file type?  Check to see if that image file type is set to open with Internet Explorer.

           

          For example, if you are using Windows 7, go to:

          Control Panel -> Programs -> Default Programs -> Associate a file type or protocol with a program

          Select the file type and change the program to the Windows Photo Viewer

           

          Let me know if you need additional clarification.

           

          TSGal

          FileMaker, Inc.

          • 2. Re: Browsing with Web Viewer
            argasoft

            Thanks for your reply.

             

            I do not think it has something to do with what you mention (anyway: images are associated with CorelPhoto) but, perhaps, with the target="_blank" tag in the html code.

             

            Dropbox - Web Viewer Browsing leads you to screen shots I've made to clarify what I mean.

             

            Thanks again for your assistance.

            Arnaldo

            • 3. Re: Browsing with Web Viewer
              TSGal

              argasoft:

               

              If you remove the target="_blank" tag, does it work?

               

              Keep in mind that the Web Viewer is not a browser.  It makes calls to the operating system's WebKit (modeled after Internet Explorer on Windows and Safari on Mac OS X) to render the pages.

               

              TSGal

              FileMaker, Inc.

              • 4. Re: Browsing with Web Viewer
                argasoft

                TSGal:

                 

                Thanks.

                 

                That was also my thought looking at the page code (where I noticed the target="_blank" in the image link instruction) with the IE or FF tools.

                But myVar = GetLayoutObjectAttribute ( "WebViewerName" ; "content") is not the same and so I have no idea how to manage it (I'm not so skilled with web languages).

                 

                I do not like it very much (as since my past AS400 years with RPG I try to write "dummies-proof" apps) but the only way out I've found is the following:

                - copy with right click the link associated with the "view image" button to clipboard
                - put clipboard in a local variable
                - extract image link
                - set a field

                 

                By the way: debugging the script (i.e. with a slower step execution) sometimes in the web viewer just the image is shown (although there's no Refresh Window step).

                 

                Thanks again for you posts.

                Arnaldo