This function uploads any local images, within the instance of EditLive! for XML, to the Web server. Upon calling this function the URLs for local images within the applet will be changed to point to the copies on the Web server instead of the local copies.
Example 17.12. UploadImages Runtime Function Example
The following code allows the user to force an upload of the images in EditLive! for XML to the Web server. The UploadImages function is called by clicking on a button within the form.
<HTML>
<HEAD>
<TITLE>EditLive! for XML JavaScript Example</TITLE>
<!--Include the EditLive! for XML JavaScript Library-->
<SCRIPT src="editlivexml/editlivexml.js" language="JavaScript"></SCRIPT>
</HEAD>
<BODY>
<FORM name = exampleForm>
<P>
<INPUT type="button" name="button1" value="Upload Images"
onClick="editlivejs.UploadImages();" >
</P>
<!--Create an instance of EditLive! for XML-->
<SCRIPT language="JavaScript">
<!--
var editlivejs;
editlivejs = new EditLiveXML("editlive",450 , 275);
editlivejs.setDownloadDirectory("editlivexml");
editlivejs.setLocalDeployment(false);
editlivejs.setConfigurationFile("sample_elconfig.xml");
editlivejs.setDocument(escape("<p>Some initial text</p>"));
editlivejs.show();
-->
</SCRIPT>
</FORM>
</BODY>
</HTML> The UploadImages function need not be called if using the EditLive! for XML onSubmit functionality.
The upload script used by this function is that specified in the EditLive! for XML configuration information in the <httpUploadData> element.
Copyright 2001-2005 Ephox Corporation. All Rights Reserved.