#102624
Giovanni Zomer
Participant

hi, Peter!
I downloaded now the latest version (yesterday’s version: I had the one before);
I got the same error;
I now extracted only the part of the code interested to create a stand-alone test, which you’ll find here below;
as I don’t see the global smart.elements.js anymore, I took the single parts to include;
the javascript error raises in the moment one clicks on one of the values on the dropdownlist;
I’m probably doing something wrong, but the few examples I found about it didn’t help me to get the solutions;
thanks in advance for checking it out!

 

<!DOCTYPE html>
<html xmlns=”http://www.w3.org/1999/xhtml”&gt;
<head>
<script type=”text/javascript” src=”smart.element.js”></script>
<script type=”text/javascript” src=”smart.validator.js”></script>
<script type=”text/javascript” src=”smart.listbox.js”></script>
<script type=”text/javascript” src=”smart.scrollbar.js”></script>
<script type=”text/javascript” src=”smart.dropdownlist.js”></script>
<script type=”text/javascript” src=”smart.form.js”></script>
<link rel=”stylesheet” type=”text/css” href=”smart.default.css” />
</head>
<body>
<form id=’EDIT’></form>

<script language=javascript>
var objFormElements=[];
objFormElements.push({ dataField:”test-string”, controlType:’template’, label:”this is a string”, template:'<input type=text size=10 maxlength=20>’ });

var objDropDownElements=[];
objDropDownElements.push({label:”lbl1″, value:”10″});
objDropDownElements.push({label:”lbl2″, value:”20″});
objDropDownElements.push({label:”lbl3″, value:”30″});

objFormElements.push({ dataField:”test-list”, controlType:’dropdownlist’, label:”this is a list”, controlOptions: {dataSource: objDropDownElements} });

objFormElements.push({ dataField:”test-string-2″, controlType:’template’, label:”this is a string2″, template:'<input type=text size=10 maxlength=20>’ });
objFormElements.push({ label:’send via post’, controlType:’submit’ });

var objForm=new Smart.Form(‘#EDIT’,{ controls: objFormElements });
</script>

</body>
</html>