Form dynamic loading parse error

Hi, i am trying to load dynamically my form and i follow your sample 02_form\11_dyn_loading.html and this is my page:

[code]
<%@page import=“it.softecspa.portal.db.Dominio”%>
<%@page import=“it.softecspa.jwebber.CMSConstants”%>
<%@page import=“it.softecspa.portal.db.Configuratore”%>
<%@page import=“it.softecspa.portal.db.UtentePortale”%>
<%@page import=“it.softecspa.portal.db.Dispositivo”%>
<%@page import=“it.softecspa.portal.Parameters”%>
<%@page import=“java.util.ResourceBundle”%>
<%@page import=“java.util.Locale”%>
<%@page import=“it.softecspa.jwebber.bo.Utente”%>
<%@page import=“java.util.Hashtable”%>
<%@page import=“it.softecspa.mvc.MVCGenericServlet”%>
<%@page import=“it.softecspa.mvc.session.Session”%>
<%
session = request.getSession();
String pin = (String)session.getAttribute(“pin”);
String id_intervento = (String)session.getAttribute(“id_intervento”);

%>

</head>
<body>
<script type="text/javascript" charset="utf-8">
dhx.ready(function(){
    dhx.ui({
		rows:[
				{view:"toolbar", visibleBatch:"initial", id:"topbar",height:40 , elements:[
					
					
					{view:"button", label:"Back", inputWidth:80, batch:"left", click:back_logic,type:"prev",align:"left"},
					{view:"label" , inputWidth:100, label: 'Lista Interventi', id:"label", align:'center'}
				]},
				{
					id:"mainarea", cells:[
						
						    { id:"lista_interventi",view: 'list',
								type: { width: 'auto', height: 22, margin: 0, padding: 10}
								, scroll: true
								, select: 1
								, template:"<div style='float:left'><div class='title'>#title#</div></div>"
								, datatype: 'json'
								, url: 'StoricoInterventiDaDestinatario?id_intervento=<%=id_intervento%>&pin=<%=pin%>&action=getStorico'
							},
							{ view: 'form',width:320, id: 'form_intervneto', elements:[]}
							
						
					]
				}
			]
		}        	
    );
    
    $$("lista_interventi").attachEvent("onafterselect",function(id){
    	$$("form_intervneto").show();//this is we here for. MULTIVIEW will be switched to the cell with form view
        loadForm(id);//this is your function which should load form with data based on clicked item ID
    });
});

function loadForm (id)
{
	adjust_toolbar();
	var url = 'StoricoInterventiDaDestinatario?id_intervento=<%=id_intervento%>&pin=<%=pin%>&action=getDetaglioStorico';
	dhx.ajax(url, function(text){
		var frm = dhx.DataDriver.json.toObject(text);
		dhx.ui(frm, $$("form_intervneto"));
	});    	
}

function back_logic()
{
	$$('mainarea').back();
	adjust_toolbar();
}

function adjust_toolbar(back){
	var id = $$('mainarea').getActive();
	if (id == 'lista_interventi' ){
		$$('label').setValue("Lista Interventi");
		$$('topbar').showBatch('initial');
	}
	else if(id == "form_intervneto")
	{
		$$('label').setValue("Dettaglio Intervento");
		$$('topbar').showBatch('left');
	}
};
</script>
</body>
[/code]

this is the json that my servlet return:

[{view: " label " ,label: " Conasegna pasto " },{view: " text " ,label: " Arrivo sul luogo " ,id: " param_3117_787 " ,value: "  " ,labelPosition: " left " },{view: " datepicker " ,label: " Ora di consegna " ,id: " param_3099_787 " ,labelPosition: " left " ,dateFormat: " %d-%m-%Y %H:%i " ,timeSelect:true},{view: " checkbox " ,label: " Pasto consegnato " ,id: " param_3100_787 " ,value: "  " ,labelPosition: " left " },{view: " text " ,label: " Note " ,id: " param_3102_787 " ,value: " 2 " ,labelPosition: " left " },{view: " label " ,label: " prova descrittivo " },{view: " text " ,label: " testo descrittivo " ,id: " param_3134_810 " ,value: "  " ,labelPosition: " left " },{view: " label " ,label: " menu tendina " },{view: " richselect " ,label: " selezinoe " ,id: " param_3135_811 " ,value: "  " ,labelPosition: " left " , yCount: " 3 " , options: [{  value: " 1 "  ,label: " uno " , value: " 2 "  ,label: " due " , value: " 3 "  ,label: " tre " }] },{view: " label " ,label: " qrcode " },{view: " text " ,label: " Barcode " ,id: " param_3136_812 " ,value: "  " ,labelPosition: " left " },{view: " label " ,label: " timestamp " },{view: " text " ,label: " Arrivato " ,id: " param_3137_813 " ,value: "  " ,labelPosition: " left " }]

and this is the error:

TypeError: b[d] is not a constructor http://192.168.14.177:8080/checking/js/dhtmlx_touch/touchui.js Line 133

Thank you for your help :slight_smile:

The problem was the space inside json text :frowning: sorry