Components | All | New | MacOS | Windows | Linux | iOS | ||||
Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old |
WebView.GetHTMLText
Queries the current HTML of the document.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
WebView | 2.8 | ✅ Yes | ✅ Yes | ❌ No | ❌ No | ✅ Yes |
MBS( "WebView.GetHTMLText"; WebViewerRef ) More
Parameters
Parameter | Description | Example |
---|---|---|
WebViewerRef | Either the Web Viewer Object Name or the Web Viewer ID as returned by "WebView.FindByName" function. |
Result
Returns html code as text or error.
Description
Queries the current HTML of the document.This is not the HTML code loaded from the server, but the current state.
Typically the website is modified with Javascript to add widgets or hide/show things at runtime.
For websites with frames, result may only contain the main frame and not any child frames.
See also WebView.GetPlainText, WebView.GetFormattedText and WebView.SelectedText.
Alternative you can run JavaScript to query document.body.parentElement.outerHTML yourself.
On Windows, the browser may include header lines in front of the html with meta data,.
Examples
Query plain text from WebViewer:
MBS("WebView.GetPlainText"; "web")
Query html text from WebViewer:
MBS("WebView.GetHTMLText"; "web")
Query formatted text from WebViewer:
MBS("WebView.GetFormattedText"; "web")
Query selected text:
MBS("WebView.SelectedText"; "web")
See also
- TextView.GetHTMLText
- TextView.SetHTMLText
- WebView.FindByName
- WebView.GetForm
- WebView.GetFormattedText
- WebView.GetPlainText
- WebView.GetSource
- WebView.SelectedText
Release notes
- Version 10.2
- Fixed an issue with WebView.GetPlainText and WebView.GetHTMLText not working with frame.
Example Databases
Blog Entries
- MBS FileMaker Plugin, version 10.2pr3
- Zooming video containers on Windows
- FileMaker and WebViewer communication
- Interactive FileMaker Containers are Webviewers
This function checks for a license.
Created 18th August 2014, last changed 13th March 2023
