1 of 1 people found this helpful
Though not tutorials per se, I'd suggest that you make sure that your reading list includes the following posts/articles:
And also possibly:
I hope this is of some help to you.
steve_ssh (as always) has some great answers for you. Here are some of my 'takes' on the subject:
I use these resources:
your usage in webviewer replaces [<mediatype>] with the text/html
you want to display something in the <data>
so your calc in the WV would be something like this:
I've used the $$html variable in the example here, so that you can change the code via script to change what's displayed in a single WV. If you desire, this can be a pointer to a field (or fields) containing your HTML. The difference would allow you to use a WV on every record in a form view (not recommended in list view) and have it update according to the record.
"data:text/html," & myHTMLfield // don't forget the COMMA!!
2. data URL/URI/protocol/schema is meant to be a SNIPPET for inclusion in another page of full HTML already containing the head, body and other elements. Therefore, when used within a WV, it also need not have these elements. Since you may be limited (at some point) with the number of characters in the calc (especially if you *do* start using base64!), then you can strip out the elements that have no contributing factor to the result. Along with this, the extra 'whitespace' may help you read your HTML, but totally ignored, so stripping saves characters, too.
a. "data:text/html," & myfield & ""
is the same if you do this:
b. "data:text/html," & myfield
That doesn't mean you cannot do the "FULL-HTML" within, it just means why bother?
4. yes, you can call external scripts and other resource, but this requires connection to the 'net and FULL-PATH to the resources (relative paths don't work so well with WV).
5. yes, you an have things like CSS and JS within globals (or other fields or variables) that can be used within your data URI calc to display the HTML, this means one set of these "resources" can be used again and again with variable HTML in records
p.s. I may do this kind of calc to make it easy to read, debug and edit, but strip the returns when calc'd:
Substitute ( List
) ; "¶" ; "" )
- "data:text/html," is just for use WITHIN a filemaker client? not for webDirect users?
Or, could I use this to:
- Host html/php pages on my webserver and push out &name=value pair variables to populate those pages, based on data in Filemaker, for end users to see?
- Create php mail () pages (templates) which I could populate and send html from Filemaker?
Would the above 2 items require a different schema than the "data:text/html,"?
the data URI is used within the WebViewer to display HTML (or whatever). I don't know how it displays or behaves with WD for you - I suppose it depends on what you have in the HTML in your fields and what you are trying to accomplish with it.
If you use html/php, it can be CustomWebPublishing (CWP), not WD (Instant). See the guide for CWP. That has nothing to do with what's in the WebViewer and data URI (although, you can use the data URI in your html, but why?).
If you are trying to "publish" HTML that is in fields, you can export (as text) and ftp the created pages. Or the "view" in WV works for FMP (or FMGo) clients (and perhaps with WD).
Please be a little more descriptive in your goals and perhaps we can figure which method(s) to use. Can you use CWP? do you know html/php? do you want to use WD? or ???