How to retrieve content from a website inside a FileMaker Web Viewer
You can create a button that will "get" the contents of the web view via the GetLayoutObjectAttribute function.
First, give the web view object a name.
Next, create a script that sets a field or variable using:
GetLayoutObjectAttribute(objectName;"source") -- returns the URL of the object GetLayoutObjectAttribute(objectName;"content") -- returns the current content of the object (html, xml, etc.)
Now create a button which calls the newly created script.
if you're going to parse xml, take a look at http://www.briandunning.com/cf/1 for a function to simplify parsing.
CrazyTim
Updated on June 05, 2022Comments
-
CrazyTim almost 2 years
I need to build a website which will be viewed inside a FileMaker Pro 11 Web Viewer. The URL will be initially set by FileMaker. After which the user may change the content of the page, generating new data. The idea is to retrieve the new data back into FileMaker.
How should the website output data for FileMaker to retrieve? Can FileMaker A) read parameters from the URL after it has changed, or B) read in the entire page as XML, then parse the XML and extract the data (Although I'm hoping for an easier solution than this).
My perspective in this matter is mainly as a web developer.
-
CrazyTim almost 12 yearsExcellent, I can design the website to update the hash in the url (via javascript). Then in FileMaker I can use GetLayoutObjectAttribute(objectName;"source") to get the url and parse it to obtain the outputted data. Not too bad a hack!