Add HTMLDivElement to multi-view dynamically?

Hello,

I am building a multi-view app, and here is the code for the multi-view portion of the config:

{ gravity:2, view:"multiview", id:"multiview1", cells:[ { template:"<div>Test Content 1</div>", id:"tabbar_1" }, { template: "<div>Test Content 2</div>", id:"tabbar_2" }, { template:"<div>Test Content 3</div>", id:"tabbar_3" } ] },

I want to be able to dynamically add HTML elements to the cells. Here is an example of what I would like to be able to do:

$$(“tabbar_1”).addHTML(myhtml);

Anyone know how to do this?

You can use next code to define content of template

$$(“tabbar_1”).define(“template”,“New html here”);
$$(“tabbar_1”).refresh();

Stanislav -

thank you for your response.

this isn’t exactly what I’m looking for, so allow me to be more specific about my situation:

I am creating a div using

var mycontainer_1 = document.createElement(“DIV”);

then, my Web Application depends on mycontainer_1 to build the content for that container. I want to be able to set the content of one of the multiview’s to THIS div.

Two possible solutions

//will place container node into the template $$("tabbar_1").define("content",mycontainer_1 );

or

//will grab innerHTML of container node $$("tabbar_1").define("template", "html->mydiv"); $$("tabbar_1").refresh();
where mydiv - id of html container