nested views in different html forms?

Hi,

I have a html form that contains a layout.

This layout has 3 rows…header, content and footer.

I have use template views pointing to another html doc…each one…

this html documents have others views…but i cant see them in my app preview…

what can i do?

this is my code…

index.html

var _main = new dhx.ui(
{
type: “wide”,
id: “mainLayOut”,
width: “100%”,
height: “100%”,
rows:
[
{
view: “template”,
id: “header”,
src: “cabecera.html”
},
{
id: “content”,
cols:
[
//divides the second row into 2 columns
{
gravity: 10,
width: 70,
view: “template”,
src: “menu.html”,
id: “menu”
},
{
gravity: 10,
view: “template”,
src: “muro.html”,
id: “contenido”
},
{
gravity: 10,
width: 70,
view: “template”,
src: “publicidad.html”,
id: “publicidad”
}
]
},
{
view: “template”,
src: “pie.html”,
id: “footer”

                }
            ]
        });

and for example…lets take menu.html of the second layout row:

i dont want to use html… i want to use dhtmlx touch views instead…

this is my javascript in that menu.html

var _menu = dhx.ui(
{
view: “label”,
label: “test”,
id: “lblTest”
}

this label does not apear in my preview…i suppose i am doing something wrong…

Any ideas?

thanks in advance…

greetings!!

Javier

I just want to divide my code into de diferent html forms…

for example…

In my index.html i implement a layout where all rows are template type and i point to a html form each other…

and id this other html form i implement a simple menu made of divs pointing to imagenbuttons…

all this imagebuttons i want to be in this childs forms…

this is my child html form code:

</div>

<script type="text/javascript" language="javascript">

    var _menu = new dhx.ui(
        {
            container:"divHome",
            view: "imagebutton", 
            id: "menuHome",
            src:"App_Resources/Android/drawable-hdpi/Menu.png", 
            label:"Inicio", 
            align:"left"
        }

</script>

</body>

Is this wrong?

which is the way i must do it? i think i do a bad use of templates src property…because i use it to point to other child html forms…but maybe are only to load some data…

thanks…greetings!

Hi Javier,

instead of template view you can use the view that you want to load:

var _main = new dhx.ui({ ..., rows:[ { id: "header", view: "toolbar", elements: [ {view: 'label', label: "Header "} ] }, ... ] });

If some issues are not solved yet, please provide more details.

Thanks alexandra,

but my goal is to divide my code into nested html forms. I do not want to have all my code in the same javascript html form…

Lets see a full example

Imagine my case…

I have a layout with 3 rows…

But the content of each row…has more views…nested… and these each views has more childs…

i dont want to mix all my code in the same form

so… i thought to use template view that let me point to other html forms and imlement those child views there… in that child form…

but…as you can see… i can not see those child views in my preview app when i execute it.

so… how can i divide my code? can you provide me an example of this…with a parent and a son forms with views in each of them please?

If you do not understand what i mean…please tell me…

Thanks in advance!!

this is my index html javascript:

        var _main = new dhx.ui(
        {
            type: "wide",
            id: "mainLayOut",
            width: "100%",
            height: "100%",
            rows:
            [
                {
                    view: "template",
                    id: "header",
                    src: "cabecera.html"
                },
	            {
	                id: "content",
	                cols:
                    [
	                //divides the second row into 2 columns
	                    {
	                    gravity: 10,
	                    width: 80,
	                    view: "template",
	                    src: "menu.html",
	                    id: "menu"
	                },
	                {
	                    gravity: 10,
	                    view: "template",
	                    src: "muro.html",
	                    id: "contenido"
	                },
                    {
                        gravity: 10,
                        width: 70,
                        view: "template",
                        src: "publicidad.html",
                        id: "publicidad"
                    }
                    ]
	            },
                {
                    view: "template",
                    src: "pie.html",
                    id: "footer"

                }
            ]
        });

and this is my menu.html body with javascript:

</div>

<script type="text/javascript" language="javascript">

    var _menu = new dhx.ui(
        {
            container:"divHome",
            view: "imagebutton", 
            id: "menuHome",
            src:"App_Resources/Android/drawable-hdpi/Menu.png", 
            label:"Inicio", 
            align:"left"
        }

</script>

</body>

hope it helps!!

Please take a look at the demo and config.js in it:

dhtmlxTouch/samples/10_server/03_app_db/index.html

Thanks a lot…it helped me…

Thats what i wanted…

greetings!