15.08.2013 Views

Ektron® eWebEditPro Developer's Reference Guide

Ektron® eWebEditPro Developer's Reference Guide

Ektron® eWebEditPro Developer's Reference Guide

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

getProperty(strName) as Object<br />

getPropertyInteger(strName) as Integer<br />

getPropertyString(strName) as String<br />

getPropertyBoolean(strName) as Boolean<br />

Below are examples of their usage.<br />

Manipulating Media File Methods and Properties<br />

bIn =<br />

<strong>eWebEditPro</strong>.instances[sEditorName].editor.MediaFile().getPropertyBoolean("HandledInternally");<br />

bUpload = objMedia.getPropertyBoolean("AllowUpload");<br />

sExt = objMedia.getPropertyString("ValidExtensions")<br />

iSz =<br />

top.opener.<strong>eWebEditPro</strong>.instances[sEditorName].editor.MediaFile().getPropertyInteger("MaxFileSizeK");<br />

objMedia.setProperty("SrcFileLocationName", cStr);<br />

<strong>eWebEditPro</strong>[sEditor].MediaFile().setProperty("TransferMethod", "mediamanager.cfm");<br />

Similar property access is done within Java applications. The Java Bean file<br />

provides the functionality for accessing properties.<br />

See Also: ”Method: getProperty” on page 71; ”Method: setProperty” on page 99<br />

Entry Point for Using External Scripts<br />

// Copyright 2000-2001, Ektron, Inc.<br />

// Revision Date: 2001-04-03<br />

The ewebeditpromedia.js file contains the entry point for external scripting of<br />

image selection and upload. Its contents are below.<br />

// Media Upload Functionality<br />

// Modify this file to customize file upload capability.<br />

function <strong>eWebEditPro</strong>MediaSelection(sEditorName)<br />

{<br />

// The transfer method specifies what to load for the transfer.<br />

var objMedia = <strong>eWebEditPro</strong>.instances[sEditorName].editor.MediaFile();<br />

var XferMethod = objMedia.getPropertyString("TransferMethod");<br />

var sPageLoad = escape(XferMethod) + '?editorname=' + escape(sEditorName) +<br />

'&upload=' + escape(objMedia.getPropertyBoolean("AllowUpload"));<br />

if(XferMethod != "")<br />

{<br />

window.open(sPageLoad, 'Images', "scrollbars,resizable,width=640,height=480");<br />

}<br />

else<br />

{<br />

alert('The Transfer Method value is empty. Please specify either "FTP" or a site<br />

address that will handle the file selection.');<br />

}<br />

}<br />

The page value is specified in XML like this.<br />

<br />

. . .<br />

<br />

<strong>Ektron®</strong> <strong>eWebEditPro</strong> Developer’s <strong>Reference</strong> <strong>Guide</strong>, Release 5.1, Revision 1 426

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!