Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

System.Gadget.Flyout.document property

[The Windows Gadget Platform/Sidebar is available for use in the operating systems specified in the Requirements section. It may be altered or unavailable in subsequent versions. ]

Gets an object that represents the Document Object Model (DOM) of the gadget Flyout HTML file.

This property is read-only.

Syntax


objdocument = System.Gadget.Flyout.document


Property value

An Object that receives the gadget DOM.

Remarks

Equivalent to the JavaScript object.

Facilitates interaction between the main gadget window and a gadget Flyout by providing the ability to modify the other window's DOM and trigger events.

Examples

The following example demonstrates how to use the document object to update the gadget DOM from a gadget Flyout.

The gadget HTML file.


<body onload="Init();">
    <g:background id="imgBackground" src="url(images/background.png)">
    <div id="gadgetContent">
        <span id="strTimeDisplay"></span><br />
        <a href="javascript:void(0);" onclick="showFlyout();">Show Flyout</a><br />
        <span id="sFlyoutFeedback"></span>
    </div>
    </g:background>
</body>

The gadget Flyout HTML file.


<body>
<g:background id="imgBackground" src="url(images/background.png)">
<div id="flyoutContent">
    <span id="strTimeDisplay"></span><br />
    <a href="javascript:void(0);" onclick="hideFlyout();">Hide Flyout</a><br />
    <input type="text" id="txtFeedback" onkeyup="showInGadget(this);" />
</div>
</g:background>
</body>

The gadget script file.


// --------------------------------------------------------------------
// Display the flyout associated with the "Flyout" gadget sample.
// --------------------------------------------------------------------
function showFlyout()
{
    System.Gadget.Flyout.show = true;
    oFlyoutDocument = System.Gadget.Flyout.document;
}

// --------------------------------------------------------------------
// Display the system time.
// --------------------------------------------------------------------
function DisplayTime()
{
    // Retrieve the local time.
    var sTimeInfo = System.Time.getLocalTime(System.Time.currentTimeZone);
    var dDateInfo = new Date(Date.parse(sTimeInfo));   
    var tHours = dDateInfo.getHours();
    var tMinutes = dDateInfo.getMinutes();
    tMinutes = ((tMinutes < 10) ? ":0" : ":") + tMinutes
    var tSeconds = dDateInfo.getSeconds();
    tSeconds = ((tSeconds < 10) ? ":0" : ":") + tSeconds;
    strTimeDisplay.innerHTML = tHours + tMinutes + tSeconds;
    if (oFlyoutDocument)
    {
        oFlyoutDocument.getElementById("strTimeDisplay").innerText = strTimeDisplay.innerHTML;
    }
}

Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

End of client support

Windows 7

End of server support

Windows Server 2008

IDL

Sidebar.idl

DLL

Sidebar.Exe (version 1.00 or later)

 

 

Community Additions

ADD
Show:
© 2015 Microsoft