10 Replies Latest reply on Jan 27, 2010 12:28 PM by mmccarty

    Container field: Export HTML



      Container field: Export HTML



        I created an instruction manual for my database in HTML.  I would like to have a button on the home page that will open this file for the user.  What I did was import my HTML document into filemaker (embedding).  Then the script attached to the button exports this document to the user's desktop and opens it automatically.  The problem is that the exported document is not the original one in the database.  The first page is similar although not the same and any buttons on the page get the "internet explorer can't find web page" error.


      I'm assuming the problem has to do with different filepaths or how html works.  I'm not really sure because I don't know anything about html.  I was thinking about trying a web viewer but the page is not on the internet. 


      Any ideas would be greatly appreciated.



        • 1. Re: Container field: Export HTML



          Thank you for your post.


          Have you considered using a Web Viewer instead?  That way, the information can be displayed from the database file itself, and no reason for the user to download it.



          FileMaker, Inc. 

          • 2. Re: Container field: Export HTML

            hi mccarty,

            does this...


            http://fmp.haifischbar.com:88/faq.aspx?ui=9f7bb5d0-0027-48eb-8df4-dde6a6a6ae50help you? described is a way to see filemaker fields directly in a webviewer, without detour via export or something else.


            greetings from germany


            • 3. Re: Container field: Export HTML
                 Kapitaen How on earth does your reference help?  It does not explain what it is trying to do and it's in german, which only a few of us can understand anyway? 
              • 4. Re: Container field: Export HTML

                pictures are self-explaining. and if you can´t read pictures, i am sorry, that is your problem ;-(


                why dont you let mccarty decide if it helps or not?


                greetings from germany

                • 5. Re: Container field: Export HTML
                     I thought about a web viewer but I don't know how to set it up.  The FileMaker Training Series has instructions on how to display a web page from the internet or construct a report using HTML but neither help me.  I have an HTML document in a container field or on my desktop which ever is better.  How do I get that to display in a web viewer?
                  • 6. Re: Container field: Export HTML


                    Thanks for the link.  I think it is describing how to use the data URL scheme to manually feed a string of HTML to the web viewer.  Unfortunately, I don't know HTML.  I have a program to quickly create instruction manuals.  It then exports my manual as either a PDF or HTML.  I don't actually write the manual in HTML.  Thanks anyways :)

                    • 7. Re: Container field: Export HTML

                      If the HTML pages have relative links between them, starting at an index.html page, then just loading the index page into a Web Viewer, as a file URL path should work.


                      Relative path example, from the main index file (which they named "intro.html"):


                      <a href="prefs/intro.html">Preferences</a> 


                      The above is saying: In this folder there is a "prefs" folder. Go to the "intro.html" file in that folder.



                      File URL path example, of HTML documentation on my computer. This is what you set the Web Viewer to.


                      file://Macintosh HD/Applications/Text/Exchanger XML Lite 3.2/help/ExchangerHelp/intro.html


                      The above would be the default path of the Web Viewer. It has to be an absolute path. You cannot give a Web Viewer a relative path for its default path. But since you're exporting the documents, you should know where the main page is.


                      Clicks on links take you to the linked HTML documents on your computer; that's what relative links do. 



                      However, you would have to look at the HTML of the files created. Perhaps you'll have to change the paths to relative paths. But really, they should be already.



                      P.S. You can return to the main page, if they forgot to put that into the HTML links on the other pages, by running a FileMaker  script step from a button:


                      Set Web Viewer [ Reset ]

                      • 8. Re: Container field: Export HTML

                        I need this to be available to multiple people using a server.  Wouldn't it only work on my computer if I feed the web viewer a file path to Manual.html  For other users the file path would be invalid.


                        Is there no way to store Manual.html in FileMaker and create a script to open it?

                        • 9. Re: Container field: Export HTML

                          It would work on other computers if you put the Manual files/folder in the web server documents folder of a central computer functioning as a web server, which had a fixed IP address (or an dynamic one that other computers knew). All you really need is a website with it on it. You would then just use an http:/URL like any other web page.


                          You could also do them locally, store them on each computer, exported to a known location. But there is one serious problem with this. Which is that you cannot store a "folder" as such in a FileMaker container field. You can however store a zipped folder (which is then a file), then tell it to automatically open upon export. You can even remove the zip file, by exporting to the same path again, but with nothing selected to export (works for me anyway). However, you must put at a Pause step in between; otherwise FileMaker deletes the zip file before it can be seen and opened; I suppose it depends on the time of the operation; but 1 second works for me; you do not notice the Pause much (other than the "Continue" button), as you'd be looking at the Manual by then.


                          There is a further problem with the above, which is that redoing it will create a 2nd folder (on a Mac anyway), as it unzips the file again. The only way to prevent that would be to look for or first delete the existing folder. You cannot delete a folder with FileMaker; but you can do it fairly easily with AppleScript, or command line or a plug-in on Windows.


                          But really, the regular http:/web_page_url is the easiest. 

                          • 10. Re: Container field: Export HTML