This property can be used to call a JavaScript function once EditLive! for XML has finished loading. Once EditLive! for XML has finished loading the JavaScript function defined by the OnInitComplete property is used as a callback.
A string specifying the name of a JavaScript function to use as the callback function once EditLive! for XML has finished loading.
Example 16.22. OnInitComplete Property JavaScript Callback Function Example
The following code provides the JavaScript callback function which will set the body content of EditLive! for XML once the applet has finished loading. The callback function is named AppletLoaded. The content of EditLive! for XML will be set to Body content set at runtime. The name of the EditLive! for XML Applet JavaScript object is ELApplet1_js.
The AppletLoaded function uses the JavaScript runtime API to set the body content of EditLive! for XML. The string used to set the body content in this example is URL encoded.
<script language="javascript">
function AppletLoaded(){
ELApplet1_js.SetDocument("%3Cp%3ESet+content+at+runtime%3C%2Fp%3E");
}
</script>Example 16.23. OnInitComplete Property Example Scripting
The following example instantiate a version of EditLive! for XML and assign a function to be used as a callback once it has finished loading. The callback used in the example code is AppletLoaded which is described by the code above.
JavaScript
var ELApplet1_js;
ELApplet1_js = new EditLiveXML("ELApplet1","700","400");
ELApplet1_js.setConfigurationFile("sample_elconfig.xml");
ELApplet1_js.setOnInitComplete("AppletLoaded");Copyright 2001-2004 Ephox Corporation. All Rights Reserved.