2 Replies Latest reply on Aug 25, 2011 8:22 PM by dhafitch

    Web Viewer Data URL Problem



      Web Viewer Data URL Problem

      Description of the issue

      I have created a zero-plugin Web Viewer interaction example.It illustrates an interesting technique, but also illustrates what appears to be some text encoding problems that are encountered when using the data URL with web viewer. Note that this example shows just one way those problems crop up. The basic problem is that many javascript based interactive web viewer examples do not work correctly when you attempt to set them up with a data URL approach.See example file here:The "holy grail" of the FileMaker Web Viewer is interaction between the web viewer and the FileMaker application. There are plugins that can accomplish this.This file demonstrates a technique that provides limited interaction but does not require a plugin.This can be done with script-triggering plugins or with the script triggering features of FileMaker 10.Basic operation:When the user clicks or tabs into a web viewer, an objectEnter script trigger starts a timer script. The timer script looks for certain data in the URL (layout object source) of the web viewer.If the web viewer points to a simple external HTML file, then when a "method=get" type of form is submitted, the form parameters appear in the URL, like this:file:///Users/bruce/Documents/fmaction.html?firstname=Bruce&lastname=RobertsonThe timer script can look for the parameters, capture them, act on them, and reset the form.Javascript in the form can put the focus back on the form field when the script selects the web viewer.Try this in layout SimpleWebTrigger FM10. Only the last name field is evaluated, try putting in values like "a" or "w" or "roc". The portal should show matching values.PROBLEM:If you use the export CONTAINER button  to generate the external html file, everything works correctly and you get a URL as shown above. However, if you use the export TEXTFIELD button, there is a problem and the result of any form submission gets truncated, see below:file:///Users/bruce/Documents/fmaction.html?f=&l=rThis appears to be a character encoding problem and you can use a text editor such as BBEdit, TextWrangler, etc to correct the encoding of the fmaction.html file. Form submissions will then work correctly.Now if you go to layout SimpleWebTrigger FM10 DataURL, you will see that  it always fails, because of the truncated URL.So it is my suspicion that there is an encoding problem that crops up when you use the data URL method with the web viewer and attempting to create interactive applications. This file demonstrates just one of the ways this problem crops up. I have encountered many instances of this problem when trying to build interactive web viewer applications.Comments welcome. --Bruce RobertsonConcise DesignFileMaker 9 Certified

        • 1. Re: Web Viewer Data URL Problem



          Thank you for reporting this.  I am able to duplicate the problem, and it appears that when you press the "Text" button, the input variables act like OnModifyKeystroke.


          I have forwarded the entire post to our Development and Software Quality Assurance (Testing) department so they can take a closer look to see what is causing the problem.  When I receive more information, I will report it here.



          FileMaker, Inc. 

          • 2. Re: Web Viewer Data URL Problem


            it appears that this encoding problem is still not fixed.  I have a nice html + javascript page to map multiple points with GoogleMaps, but cannot get it to work using the data URL in the Web Viewer.  What is the workaround?  You mentioned plug-ins.  Are there plub-ins to make this work?  If so, could you please let us know what are the simplest/best?

            Many thanks,