Jump to content

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


The Bridge

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

Recommended Posts

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
Link to comment
Share on other sites

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!

Link to comment
Share on other sites

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!

Link to comment
Share on other sites

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!

Link to comment
Share on other sites

  • 2 weeks later...

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).

Link to comment
Share on other sites

  • 3 weeks later...

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

Link to comment
Share on other sites

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

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).

Link to comment
Share on other sites

  • 2 weeks later...

This topic is 6395 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.