EditLive! 9 Documentation : setBaseURL Method

This property can be used to set the base URL used by EditLive! to resolve relative URLs (e.g. image URLs). The base URL property must be a URL for a virtual directory. The base URL property should be used in circumstances where it is impractical to set the <base> element of the EditLive! configuration file (e.g. when a single EditLive! configuration file is used within a system where EditLive! is used in multiple instances for editing pages with differing base URLs). 

Syntax

Visual Basic Script
object.BaseURL = strBaseURL
ASP.NET
prefix:EditLiveJava BaseURL = strBaseURL
JavaScript
editliveInstance.setBaseURL(strBaseURL);

Parameters

strBaseURL

A string specifying the base URL to be used with this instance of EditLive!. The URL should map to a virtual directory. The base URL is used by EditLive! when resolving any relative URLs found within the editor.

Examples

The following code would set the base URL for an instance of EditLive! to http://www.yourserver.com/editor/. This URL will be used when resolving all relative URLs in the EditLive! content and configuration file (e.g. URLs for images and links).

VBScript
editlive1.BaseURL = "http://www.yourserver.com/editor/"
ASP.NET Server Control
<elj:EditLiveJava
   ...
   BaseURL="http://www.yourserver.com/editor/"
   ...
/>
JavaScript
editlive_js.setBaseURL("http://www.yourserver.com/editor/");

Remarks

The base URL property must map to a virtual directory on a Web server and be a valid URL with a trailing /. For example, http://www.yourserver.com/editor/ is a valid base URL while http://www.yourserver.com/editor is not.

Any value set in the <base> element of the EditLive! configuration file takes precedence over a value set through the base URL property. When using the base URL property to set the base URL it is recommended that you do not also set a value in the <base> element of the EditLive! configuration file.

See Also

  • <base> Configuration File Element