This function uploads any local images, within the instance of EditLive! for Java, 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.
JavaScript object.UploadImages()
This function takes no parameters.
The following code allows the user to force an upload of the images in EditLive! for Java to the Web server. The UploadImages function is called by clicking on a button within the form.
<HTML>
<HEAD>
<TITLE>EditLive! for Java JavaScript Example</TITLE>
<!--Include the EditLive! for Java JavaScript Library-->
<SCRIPT src="editlivejava/editlivejava.js" language="JavaScript"></SCRIPT>
<SCRIPT language="JavaScript">
</SCRIPT>
</HEAD>
<BODY>
<FORM name = exampleForm>
<P>
<INPUT type="button" name="button1" value="Upload Images"
onClick="editlivejava1.UploadImages();" >
</P>
<!--Create an instance of EditLive! for Java-->
<SCRIPT language="JavaScript">
<!--
var editlivejava1;
editlivejava1 = new EditLiveJava("eljava",450 , 275);
editlivejava1.setDownloadDirectory("editlivejava");
editlivejava1.setLocalDeployment(false);
editlivejava1.setXMLURL("sample_eljconfig.xml");
editlivejava1.setBody(escape('<p>Some initial text</p>'));
editlivejava1.show();
-->
</SCRIPT>
</FORM>
</BODY>
</HTML>
The UploadImages function should be called prior to using the GetBody or GetDocument functions from the EditLive! for Java JavaScript API to retrieve the contents of the EditLive! for Java applet.
The UploadImages function need not be called if using the EditLive! for Java onSubmit functionality.
The upload script used by this function is that specified in the EditLive! for Java XML configuration information in the <httpUploadData> element.
- Ephox EditLive! for Java JavaScript Run Time API
- Getting and Setting the EditLive! for Java Contents at Run Time
- <httpUploadData> XML element
- GetBody JavaScript Function
- GetDocument JavaScript Function
Copyright © 2001-2004 Ephox Corporation. All Rights Reserved.