7 Replies Latest reply on Aug 25, 2014 4:52 PM by steve_ssh

    webviewer in IWP

    kalle2100

      Hi

      Im trying to use vebwiers in IWP, it works nicely but I cant get rid of the borders, it lookks a bit ugly

      I have seen a few posts about it but i don't understand

       

      in the web viewer setup i put:

       

       

      "data:text/html,

      <img src='" & habitations 7::photo url 1 & "' style='width:100%; height:100%;' />"

       

      to make the photo fill the viewer, but i can't get rid of the borders,

       

      happy for any help available!

        • 1. Re: webviewer in IWP
          Mike Duncan

          You might also want to put some minimal css/html as well to specify the default margins and border.

           

          <html>

          <head>

          <style>

          body { border: 0px; margin: 0px }

          </style>

          </head>

          <body>...

          • 2. Re: webviewer in IWP
            steve_ssh

            Hello Kalle,

             

            Here are three possible things that one might wish to work on in this scenario:

             

              1) Use the layout object inspector to make sure that the actual WebViewer object on the FileMaker layout is not set to have any border.

             

              2) As suggested by Mike Duncan: Use CSS to remove unwanted padding and margin which can look bad or cause scrollbars to appear (or both)

             

              3) Remove the bevel that the browser puts around the iframe which renders the webviewer content.  This can be done with a hack.

             

             

            Just taking care of items #1 and #2 can go a long way to make things look better, and may be all that you are looking for.

             

            If you are also looking to get rid of the bevel around the webviewer, you have to be a little bit more crafty.

             

            I will attach a file which I threw together to try to illustrate each of the above.

             

            Very best regards,

             

            -steve

            • 3. Re: webviewer in IWP
              kalle2100

              Hi thanks for reply!

              i don't know how to use CSS language. The little CSS i put to fit the picture was just something i found on the web, I copied and pasted in to the webviewer setup, and it worked.

              Do you know where I can learn about how to put in the css commands

               

              i tried like this

              "data:text/html,

              <img src='" & habitations 7::photo url 1 & "' style='width:100%; height:100%;body { border: 0px; margin: 0px }' />"

               

              but I don't think it changed anything

               

              Best regards

              Kalle

              • 4. Re: webviewer in IWP
                kalle2100

                Hi again

                thanks for help!

                I noticed that when I try to resize a picture to fill the webviewer it works fine in chrome mozilla etc but not in explorer, where i just get an error message

                in french:

                La page Web ne peut pas être affichée'

                 

                It looks much better when the picture adjusts to the webviewer size. I used this little code that i copied somewhere on technet:

                 

                "data:text/html,

                <img src='" & habitations 7::photo url viewer & "' style='width:100%; height:100%;' /><html>

                <head>

                <style>

                body { border: 0px; margin: 0px }

                </style>

                </head>

                <body>"

                 

                is there a way to make it work better ?

                • 5. Re: webviewer in IWP
                  steve_ssh

                  Hello Kalle,

                   

                  If you can, I'd suggest checking out the attached archive that I posted earlier in this thread.  It has four layouts, each of which illustrates a possible approach to this situation.

                   

                  I believe that you will find that the 4th approach will work with IWP in:

                   

                    - Chrome

                    - Firefox

                    - Safari

                    - IE version 9 and later

                   

                  It does not work with IE7, IE8.

                   

                  If that 4th technique seems to suit your purposes, I'd suggest creating a custom function to encapsulate the calculation that is in the WebViewer, so that you can reuse it more easily.

                   

                   

                  Note:

                   

                  If the layout in question also needs to function properly in an FMP client, then I'd strongly suggest that you also test and experiment with that scenario to make sure that things work as desired.

                   

                   

                  I sincerely hope this helps.

                   

                  Kind regards,

                   

                  -steve

                  • 6. Re: webviewer in IWP
                    kalle2100

                    hi

                    thanks!

                    i used no 4

                    it works perfectly on all platforms!!

                    • 7. Re: webviewer in IWP
                      steve_ssh

                      That is excellent news.   Thank you for the update & best regards!

                       

                      -steve