With SSL enabled, WebDirect will redirect clients from HTTP requests to HTTPS. WebDirect will automatically use that certificate as well. It is a best practice to have an SSL certificate installed on your production FileMaker Server. Just be aware that loading them in an iframe element may behave differently than how they are handled in a FileMaker Pro client. You may still choose to have external references. So far, the assumption has been made that all JavaScript and assets are being loaded inline, without external references. There are other factors to consider that may cause issues as well. You really have to look twice to see what screen shot belongs to which application! Other Considerations Here is the result in FileMaker Pro: Results in FileMaker Pro The same layout viewed in FileMaker WebDirect Layout viewed in FileMaker WebDirect With this test, we optimize for both clients and ensure that our content functions everywhere. Note the addition of “ base64” if the application is coming from a “Web” client. "data:text/html base64," & Base64Encode ( HTML::HTML_Calc_Here ) PatternCount ( Get ( ApplicationVersion ) "Web" ) However, we can test to see if a user is in WebDirect or not, and direct the output of the Web Viewer appropriately. This provides a safe way of transferring that html data so it will be unencoded by the web browser, where it is rendered at runtime.Īdmittedly, this introduces a little more processing that has to happen somewhere, and can cause a slight delay when rendering in FileMaker Pro vs. In this case, it can still be applied when the media type is “text/html” as well. Typically, you would use this to represent non-textual data, such as images or other binary data. Part of the syntax of a data URI allows for specifying the content as being encoded as Base64. There is likely an unsupported character or combination somewhere in the included libraries that makes it incompatible with loading as a data URI directly. The issue with displaying arbitrarily large or complex data URLs in FileMaker WebDirect is that the “src” attribute has the potential to break with some JavaScript included as part of the data URI. They also help us avoid network latency and dependencies, including JavaScript.įor example, setting FileMaker Web Viewer with html, preceding it like this: "data:text/html,…" We often use them in FileMaker to construct HTML to display in a web viewer. A data URI, instead of including a location, embeds the data to display directly in the document. You are probably familiar with URLs that start with “http” or https” but there are many other types of uniform resource identifiers (URI). However, if you have used JavaScript, such as in Jeremy Brown’s useful Web Viewer Integrations Library, to display graphs in the FileMaker Web Viewer via data URLs, you may run into issues when displaying in FileMaker WebDirect. JavaScript can expand the functionality to include almost any type of graph you can imagine and populate it with your FileMaker data. Seems pretty straightforward, right? However, arbitrarily long URLs or odd characters may cause the iframe to break and not load. The remote content of an iframe object is referenced as an attribute, at a very basic level, like so: Iframes are a special type of HTML entity meant to easily specify and display other HTML content to display within that iframe object. However, in WebDirect, content needs to be loaded inside the web page as the content of an “iframe” entity. This functions just like you would open a new tab in your web browser and load a URL. However, after discussing the issue with co-workers Jeremy Brown and Ross Johnson, we discovered several workarounds. I’d like to share the simplest and most elegant solution.įirst, the FileMaker Web Viewer, when shown on a FileMaker Pro layout, runs as its own independent web page. At first, our team assumed this was a limitation of FileMaker WebDirect. As these techniques become more popular, more developers may experience this issue. We have received several inquiries regarding the issue of FileMaker Web Viewers not rendering in WebDirect. Are you looking for help taking your FileMaker solution online? Learn more about enhancing your FileMaker application with custom web features.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |