Search
WindowBase.template Property
See Also
 






Gets or sets an HTML string, representing the content template.

Namespace: MindFusion.Common.UI
File: WindowBase.js

 Syntax

JavaScript  Copy Code

get template() {}

 Property Value

String. An HTML string representing the content template.

 Example

The following code creates a Window programmatically and specifies its content template to be the HTML code for an element called "container" taken from the web page:

JavaScript  Copy Code

function loadChatWindow(sender, args)
{
   var container = document.getElementById("container");

   var window = new ui.Window();
   window.top = ui.Unit.percentage(25);
   window.left = ui.Unit.percentage(25);
   window.width = ui.Unit.pixel(400);
   window.height = ui.Unit.pixel(300);
   window.minWidth = ui.Unit.pixel(250);
   window.minHeight = ui.Unit.pixel(300);
   window.title = args.item.title;
   window.data = args.item;
   window.template = container.outerHTML;
}

 See Also