I have done list with one buttone. With button pressed, it shoud toggle one field in list and in SQL db. I have used list button controls, but now my problem is that how can I update list to SQL db with javascript. . The example works and it toggles list form 0 to 1 and vice versa. But store does not work.
Any ideas what would work ? List9 is unbound.

This also supposed change color of button defined in button conditional style, but refresh does not use conditional style.

Is there some pointer to button text in List ? I might change to button text as well, when filed changes or color or other CSS .

field button code:

alert ( "Button pressed, change value" );

var nayta_modul = data.VISIBILITY;

var lObj = {dialog.object}.getControl('LIST9');

if ( nayta_modul == 1 ) {
alert ( "== 1 in Row, set 0 " );
lObj.updateRow(rowNumber,{ VISIBILITY: 0});
else {
alert ( "<> 1 In Row, set 1 " );
lObj.updateRow(rowNumber,{ VISIBILITY: 1});


// {dialog.object}.saveListEdits('LIST9',{rows: rowNumber}); this does not work