EditLive! 9 Documentation : uploadImages Method

This method uploads any local images within the instance of EditLive! to the Web server. Upon calling this method 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.

Prior to version 8.0 this function was asynchronous. The callback notification mechanism is still supported, however since version 8.0 this function can now be used synchronously.





This parameter is optional.

The JavaScript function which is called after all local images have been uploaded.


The following code allows the user to force an upload of the images in EditLive! to the Web server. The uploadImages method is called by clicking on a button within the form.

      <TITLE>EditLive! JavaScript Example</TITLE>
      <!--Include the EditLive! JavaScript Library-->
      <SCRIPT src="editlivejava/editlivejava.js" language="JavaScript"></SCRIPT>
      <FORM name = exampleForm>
            <INPUT type="button"
               value="Upload Images"
               onClick="editlivejs.uploadImages();" >
         <!--Create an instance of EditLive!-->
         <SCRIPT language="JavaScript">
            var editlivejs = new EditLiveJava("editlive",450 , 275);
            editlivejs.setDocument(encodeURI("<p>Some initial text</p>"));


The uploadImages method should be called prior to using the GetBody or GetDocument load-time properties to retrieve the contents of the EditLive! applet.

The uploadImages method need not be called if the contents of EditLive! are processed through a server-side script using a HTTP Post. For more information on using HTTP Posts to retrieve EditLive! content, see the Retrieving Content From EditLive! article.

The upload script used by this method is the script specified in the EditLive! configuration file through the <httpUploadData> element.

See Also