form_button onclick

view: ‘form’,
data: [
{ type: ‘text’, name: ‘edtUPC’, label: ‘UPC’, value: ‘’, position: ‘label-left’, inputWidth: ‘200’, labelWidth: 100, align: ‘left’, labelAlign: ‘center’, id: ‘edtUPC’},
{ type: ‘form_button’, name: ‘btnSearch’, value: ‘Search’, align: ‘right’, width: 295, id: ‘btnSearch’}
], height: 100, id: 1294092263467
},

How tho define onclick in the form_button ?

a) add id to the form

view: 'form', id:"myform"

b) attach event

$$('myform').attachEvent("onItemClick", function(id){ //id - id of button });

Oncoming update will provide alternative way, through “click” property of form element object

Thanks for the reply, but did’t work.

Shows this error:

Uncaught TypeError: Cannot call method ‘attachEvent’ of undefined

Check the attached sample
form_0_4.ZIP (52.2 KB)

Thanks, works great !