Difference between revisions of "Mixing Widgets into an HTML Page"

m
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
[[Zimbra AjaxTk]]->[[DHTML Widget Toolkit]]->[[Widgets]]
+
{{Archive}}[[Zimbra AjaxTk]]->[[DHTML Widget Toolkit]]->[[Widgets]]
  
 
== HTML ==
 
== HTML ==
Line 41: Line 41:
 
   toolbar.reparentHtmlElement(div);
 
   toolbar.reparentHtmlElement(div);
 
</pre>
 
</pre>
 +
 +
 +
{{Article Footer|unknown|4/19/2006}}
 +
 +
[[Category:Zimbra AjaxTk]]

Latest revision as of 12:28, 24 March 2015

Zimbra AjaxTk->DHTML Widget Toolkit->Widgets

HTML

  <h1>Menu Test</h1>

  <div id="menu_bar">
    & nbsp;
  </div> <!-- menu_bar -->
  


Set up the Shell

Must set to virtual

 var shell = new DwtShell("MainShell", true, null, null, true);
 shell.setVirtual();

Putting a Widget in a <div>

To put a Dwt widget in a <div> , you need to get the document element of the <div> , clear the contents and then reparent the Dwt widget in the element. Here is an example of how to do that.

  // create a toolbar
  var toolbar = new DwtToolBar(parent, "mainMenu", DwtControl.ABSOLUTE_STYLE, 2);

  /*
    ... Here we would have the code to add buttons to the toolbar 
  */

  // Get the div into which we want to place the toolbar
  var div = document.getElementById("menu_bar");

  // Clean out any content
  div.innerHTML = "";

  // Reparent the toolbar's HTML element to the div
  toolbar.reparentHtmlElement(div);


Verified Against: unknown Date Created: 4/19/2006
Article ID: https://wiki.zimbra.com/index.php?title=Mixing_Widgets_into_an_HTML_Page Date Modified: 2015-03-24



Try Zimbra

Try Zimbra Collaboration with a 60-day free trial.
Get it now »

Want to get involved?

You can contribute in the Community, Wiki, Code, or development of Zimlets.
Find out more. »

Looking for a Video?

Visit our YouTube channel to get the latest webinars, technology news, product overviews, and so much more.
Go to the YouTube channel »

Jump to: navigation, search