You are here: Reference > JavaScript > client-side > ActiveX > HtmlDlgSafeHelper objects > objects > HtmlDlgSafeHelper

HtmlDlgSafeHelper object

Browser support:
This object is an ActiveX object that provides access to some system information and common dialogs on Windows.
Use the object element with the 3050f819-98b5-11cf-bb82-00aa00bdce0b class identifier to create an HtmlDlgSafeHelper (alias Dialog Helper) object. The HtmlDlgSafeHelper object is not rendered. Since the document is loaded, the members of the HtmlDlgSafeHelper object are available.

Possible members:

Properties:
blockFormats
Represents a collection of available block format tags.
fonts
Represents a collection of all available fonts in the current system.
Methods:
ChooseColorDlg
Displays the standard Windows Color dialog box in Internet Explorer.
getCharset
Returns the default character set (code page) of the given font in Internet Explorer on Windows.

Example HTML code 1:

This example illustrates the use of the HtmlDlgSafeHelper object:
<head>
    <script type="text/javascript">
        function ChangeColor (button) {
            try {
                var dlgHelper = document.getElementById ("dlgHelper");
                var newColor = dlgHelper.ChooseColorDlg ();
                button.style.color = newColor;
            }
            catch (e) {
                alert ("Your browser does not support this example!");
            }
        }
    </script>
</head>
<body>
        <!-- The Dialog Helper Object for the ChooseColorDlg method -->
    <object id="dlgHelper" classid="clsid:3050f819-98b5-11cf-bb82-00aa00bdce0b" width="0px" height="0px"></object>              
    <button onclick="ChangeColor (this);">Change Font color</button>
</body>
Did you find this example helpful? yes no

External links:

User Contributed Comments

Post Content

Post Content