Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

How do I show a local html page with web viewer using a relative path ?

Featured Replies

I've created a FM developer project that outputs an XML file that gets used by a Flash Project.

The flash project is published as 'ataf.swf' file which is embedded in a local html web page named 'ataf.html'

ataf.swf and ataf.html are in the same directory as the Filemaker project.

Everything works fine, however I want this local web page to appear on a layout in the Filemaker project itself (using a web viewer portal), so the user can test if the xml export was a success directly from Filemaker (without opening up a browser).

Within web viewer I've tried the URL 'file:///ataf.htm', but it just shows 'file doesn't exist'.

I think it's looking in a different place and not in the directory that the filemaker project is running from.

The final project will be made into a Filemaker Pro Advanced project for Mac and PC, so I can't use a full file path (because they would be different on each machine), unless perhaps I need to write a script that will determine the directory the FM project is in and then add 'ataf.html' to the end of that ?

Any help would be very much appreciated.

Thanks in advance :-)

perhaps I need to write a script that will determine the directory the FM project is in and then add 'ataf.html' to the end of that ?

You should calculate the absolute path to the file, using Get (FileName) as your starting point - see something similar here:

http://fmforums.com/...post__p__370547

  • Author

Many thanks, that helped a lot :laugh2:

  • 4 years later...

Sorry for continuing this thread. I haven't got any success in showing a local .html file thru WebViewer

I entered the absolute path, as that was calculated by the example file in post #2 (for a MAC computer)

The webviewer seems to find the file but give me a message that a suitable application was not found to open the file

What is wrong?

 

** UPDATE **

Solved : I had a problem with slashes "/"

"file://Macintosh HD/Users/JohnDoe/Desktop/Folder/File.html"

correct format

Edited by Dimitrios Fkiaras

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.