EditLive! 9 Documentation : setHead Method

This property sets the content of EditLive! between the <HEAD> tags.

Syntax

Visual Basic Script 
object.Head = strHead
ASP.NET

This attribute no longer exists in the ASP.NET controls. Please use the Content property instead.

JavaScript
editliveInstance.setHead(strHead);

Parameters

strHead

A string containing the text that will be the initial contents of the instance of EditLive! between the <HEAD> and </HEAD> tags.

The default value is an empty string.

Example

The following code creates an instance of EditLive! and sets the initial contents of the document head to be <HEAD><TITLE>Example Head</TITLE><BASE href="http://www.ephox.com/" target="_TOP"></HEAD>.

VBScript
editlive1.Head = "<HEAD><TITLE>Example Head</TITLE><BASE href="http://www.ephox.com/" target="_TOP"></HEAD>"
JavaScript
editlive_js.setHead(encodeURI('<HEAD><TITLE>Example Head</TITLE><BASE href="http://www.ephox.com/" target="_TOP"></HEAD>'));

The string passed to the JavaScript setHead property must be URL encoded. It is recommended that a server-side URL encoding function be used if available as the JavaScript URL encoding functions do not fully comply with the URL encoding standard.

Remarks

When using the setDocument Method, the document <HEAD> specified by the Head property overwrites any information set in the <HEAD> of the document specified by the setDocument Method.

The information specified in the EditLive! XML Configuration Document in the <head> element overwrites any information specified for the document <HEAD> via either the setDocument or setHead load-time methods.