Xojo Conferences
XDCMay2019MiamiUSA

Platforms to show: All Mac Windows Linux Cross-Platform

Previous items

HTMLViewer.IENavigatorUserLanguageMBS as string
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method HTMLViewer Win MBS Win Plugin 7.8 No Yes No No No
Function: Retrieves the operating system's natural language setting.
Notes: Example value: "de"

Some examples which use this method:

Feedback, Comments & Corrections

HTMLViewer.IEProtocolMBS as string
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method HTMLViewer Win MBS Win Plugin 7.8 No Yes No No No
Function: Sets or retrieves the protocol portion of a URL.
Notes: Example value: "HTTP (HyperText Transfer-Protokoll)"

Some examples which use this method:

Feedback, Comments & Corrections

HTMLViewer.IEReadyStateMBS as string
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method HTMLViewer Win MBS Win Plugin 12.2 No Yes No No No
Function: Retrieves a value that indicates the current state of the htmlviewer.
Notes:
uninitialized: Object is not initialized with data.
loading: Object is loading its data.
loaded: Object has finished loading its data.
interactive: User can interact with the object even though it is not fully loaded.
complete: Object is completely initialized.

An object's state is initially set to uninitialized, and then to loading. When data loading is complete, the state of the link object passes through the loaded and interactive states to reach the complete state.

The states through which an object passes are determined by that object; an object can skip certain states (for example, interactive) if the state does not apply to that object.

Data source objects and databound elements are normally populated asynchronously, and certain programmatic operations can only be performed reliably on databound objects when they are ready for use. Therefore, the appropriate code should be written to confirm the readyState of objects prior to performing certain operations on them. For example, walking the rows of a table should not be attempted until after the table has reached the complete state.

The readyState property enables the status of an object to be tested. The correct place to test the readyState property is in the event handler for onreadystatechange. Similarly, a data source object (DSO) fires the ondatasetcomplete event to notify the document that the dataset is ready for programmatic operation.

Feedback, Comments & Corrections

HTMLViewer.IERefCountMBS as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method HTMLViewer Win MBS Win Plugin 15.1 No Yes No No No
Function: Queries the reference count of the IE browser object.
Notes: Useful to check if references are leaked.

Feedback, Comments & Corrections

HTMLViewer.IEReferrerMBS as string
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method HTMLViewer Win MBS Win Plugin 7.8 No Yes No No No
Function: Gets the URL of the location that referred the user to the current page.
Notes: Example value: "http://www.apple.com/"

Some examples which use this method:

Feedback, Comments & Corrections

HTMLViewer.IEReloadMBS(Force as boolean = false) as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method HTMLViewer Win MBS Win Plugin 12.0 No Yes No No No
Function: Reloads the current page.
Notes:
Boolean that specifies one of the following possible values:
False: Default. Reloads the document from the cache.
True: Reloads the document from the server.

Some examples which use this method:

Feedback, Comments & Corrections

HTMLViewer.IERunJavaScriptMBS(JavaScript as string) as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method HTMLViewer Win MBS Win Plugin 8.0 No Yes No No No
Function: Runs a given javascript code.
Example:
// shows current user agent string which the control sends to website
call htmlviewer1.IERunJavaScriptMBS("document.title=navigator.userAgent;")
MsgBox htmlviewer1.IETitleMBS

// load a dummy page:
HTMLViewer1.LoadPage "<html><head></head><body></body></html>", nil

// shows an error message because of the navigator having a 6 inside:
call htmlviewer1.IERunJavaScriptMBS("document.title=navig6ator.userAgent;")

// uses try to avoid error message

dim script as string = "document.title=navig6ator.userAgent;"
dim s as string = "try { "+SCRIPT+" } catch(err) {document.title = err.description;}"

call htmlviewer1.IERunJavaScriptMBS(s)
MsgBox HTMLViewer1.IETitleMBS // shows "navig6ator is undefined"
Notes:
Returns true if the javascript code was sent to the browser.
Returns false on any error.

The IE API does not allow to return values from Javascript. So you need to store your result in window.title and access it later using IETitleMBS.

IERunJavaScriptMBS fails if the htmlviewer is empty. You can load a dummy page like above.

For Windows use EvaluateJavaScriptMBS function.

Some examples which use this method:

Feedback, Comments & Corrections

HTMLViewer.IEScrollHeightMBS as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method HTMLViewer Win MBS Win Plugin 9.5 No Yes No No No
Function: Queries the height of the html viewer content.
Notes: Returns 0 on any error.

Some examples which use this method:

Feedback, Comments & Corrections

HTMLViewer.IEScrollWidthMBS as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method HTMLViewer Win MBS Win Plugin 9.5 No Yes No No No
Function: Queries the width of the html viewer content.
Notes: Returns 0 on any error.

Some examples which use this method:

Feedback, Comments & Corrections

HTMLViewer.IESecurityMBS as string
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method HTMLViewer Win MBS Win Plugin 7.8 No Yes No No No
Function: Retrieves the security state.
Notes: Example value: "Für diesen Dokumententyp gibt es kein Sicherheitszertifikat."

Some examples which use this method:

Feedback, Comments & Corrections

HTMLViewer.IESetTextAreaMBS(FormName as String, FieldName as String, Value as String) as Boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method HTMLViewer Win MBS Win Plugin 16.3 No Yes No No No
Function: Sets text for a textarea.
Notes:
FormName can be "" to look for any field with given name.
Raises exception if field is not found.
Returns true if text is set or false on failure.

Some examples which use this method:

Feedback, Comments & Corrections

HTMLViewer.IETextMBS as string
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method HTMLViewer Win MBS Win Plugin 7.7 No Yes No No No
Function: Returns a copy of the text of the current webpage.
Example:
msgbox htmlviewer1.IETextMBS
Notes:
Asks Internet Explorer for a selection of the whole document and asks selection about the text content.
Returns "" on any error.

On Mac OS X, you can use HTMLViewer1.mainFrameMBS.dataSource.data to get the document html text.

Some examples which use this method:

Feedback, Comments & Corrections

HTMLViewer.IETitleMBS as string
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property HTMLViewer Win MBS Win Plugin 7.8 No Yes No No No
Function: Sets or gets the title of the document.
Notes:
Example value: "Apple"
(Read and Write computed property)

Some examples which use this property:

Feedback, Comments & Corrections

HTMLViewer.IEToStringMBS as string
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method HTMLViewer Win MBS Win Plugin 7.8 No Yes No No No
Function: Retrieves a string representation of the object.
Notes: Example value: "[object]"

Some examples which use this method:

Feedback, Comments & Corrections

HTMLViewer.IEURLMBS as string
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property HTMLViewer Win MBS Win Plugin 7.8 No Yes No No No
Function: Sets or gets the URL for the current document.
Notes:
Example value: "http://www.apple.com/"
(Read and Write computed property)

Some examples which use this property:

Feedback, Comments & Corrections

Previous items

The items on this page are in the following plugins: MBS Win Plugin.




Links
MBS Xojo blog