Listing 2: scrclbck.htm Test page for final control
<HTML> <HEAD> <TITLE>ATL 3.0 test page for object ScriptCallback</TITLE> <SCRIPT> // The callback function // function Func() { // Alert on activation and test context alert(this.Callback.toString()); } // Connect the script callback // Wait until page (and the control) are fully loaded // function Loaded() { ScriptCallback.Callback = Func; } window.onload = Loaded; </SCRIPT> </HEAD> <BODY> <OBJECT ID="ScriptCallback" CLASSID="CLSID:986FB4FE-75D8-4D1C-9D9C-A755F15C2C8C" HEIGHT=1 WIDTH=1> </OBJECT> </BODY> </HTML>