Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

Dynamic Web Viewer Content (offline html generation without external files!)


This topic is 6641 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted (edited)

I did a little research (Google is our friend) and it is entirely possible to dynamically generate content inside a WebViewer object without resorting to HTTP calls or loading local files.

In other words, you can create any content you want (even graphics if you know the format) without requiring external files or even a connection to a web server.

The key is to use the DATA protocol. This article won't go into all the details; again, use a search engine for more information.

Attached is a sample file that will dynamically fill a box with a colour that you specify using hex. One field, one WebViewer object, and one button... no scripts, no exporting, no importing, no file references!

WebViewer.fp7.zip

Edited by Guest
clarification
Posted

What a shame. I didn't test this on my Windows machine until now. Perhaps in the next release of IE they will include support for the data url.

Sorry folks, looks like this is a Mac OSX feature only for the time being!

Posted

Here's how I learned about the data URI scheme:

http://en.wikipedia.org/wiki/Uniform_Resource_Locator

and

http://en.wikipedia.org/wiki/Data:_URL

and

http://en.wikipedia.org/wiki/About:_URI_scheme

Fun reading!

Posted

Yes, I am using the latest version of XP Pro with all patches in place. I'll keep fiddling with the web viewer as I still can't get it to work. For now I'll just export my file and then load it as that works OK. Plus, I'll continue to follow this thread.

Thanks for the reply!

  • 2 weeks later...
Posted

Peter,

this is a great find. I've tested it (on IE) and gotten it to make many colorful blank web pages. I am wondering, is there a way to make this idea help me populate fields that already exist on a webpage? I want to use the WebViewer to populate the fields in a form but the form uses the POST method, which doesn't allow me to paste things into the URL (not successfully, anyway). I would love it if I could simply populate the fields and only have to click on the submit button. Is there a way to do this with the method you've provided here? (or any other way you can think of?). TIA

-Peter (that's my name, too).

Posted

This works really well. Generating html code in a field to use for the display in the web viewer object and using css style sheets (held on a network drive) for formatting. Very nice indeed. Thanks for pointing to the possibilities.

Posted

rogermax, were you able to get this to work on XP with the demo file that TheBridge originally supplied? I can't get anything to happen on XP (with FM8.5A) and don't know why. If you're doing anything differently, maybe that will help me.

Thanks!

James

www.james-mc.com

  • 3 weeks later...
Posted

http://fmforums.com/forum/showpost.php?post/220339/

These are several methods for calling on an image (ore other media) that has its source stored in a field or is embedded in the web Viewer itself...

Took a few days to work out but it really could be quite useful.

There are a few things that others could help out on ... see file

best,

Stuart

  • 2 weeks later...
  • 1 month later...
Posted

If you go to the web viewer help, look under "Defining a custom web address", there is a hyperlink to the topic "About URL Encoding in web viewers" that discusses what chars will be encoded.

What it says is: "A pound sign (#) is encoded only if a number character (0 through 9) follows it."

So, in this case (since you need it encoded), you could try to place numbers after each # if possible (that works in SVG).

Posted

this is starting to make sense. but in order have w3c compliant IDs, you can't have the id start with a number, which means I must do things like #foo, where foo is not a number. Any ideas how to accomplish that?

  • 2 weeks later...

This topic is 6641 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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