This method is used to add a view to EditLive! for XML. A view is presented to the user as a tab within EditLive! for XML. This method can be called multiple times in order to add multiple views to EditLive! for XML.
This method cannot be used with the Visual Designer. To set a view for the Visual Designer the addViewAsText method must be used.
A string specifying the name for the view being added. This name will be displayed on the tab representing the view on the interface of EditLive! for XML.
A URL specifying the Web accessible location of the file for this view. This value can be either a relative or an absolute URL. Relative URLs are relative to the location of the page in which EditLive! for XML is embedded.
Example 16.3. addView Method Example Scripting
The following example demonstrates how to load the views specified by the URLs http://yourserver.com/views/viewOne.xsl and ../views/secondView.xsl. These views are named First View and Second View respectively.
JavaScript
var editlivexml = New EditLiveXML("ELXApplet1","700","400");
editlivexml.addView("First View","http://yourserver.com/views/viewOne.xsl");
editlivexml.addView("Second View","../views/secondView.xsl");This method can be called multiple times to add multiple views to EditLive! for XML.
Each view added to EditLive! for XML is presented to a user via a tab on the interface. The tab for the view will be labeled with the value of the strName parameter.
Views can also be added as a string of text via the addViewAsText method.
Copyright 2001-2004 Ephox Corporation. All Rights Reserved.