3.2.0

Example Add row with text input & button with javascript (simple) ALEX-please read


<script language="javascript" type="text/javascript">
function insertItem(){
         var addData = '["'+document.formOne.textOne.value+'"]';
         myData.unshift(eval(rowData));
         obj.setRowCount(myData4.length);
         obj.refresh();
}
[/script]

<form name="formOne"><input type='text' name='textOne'><input type='button' value='Add' onClick='insertItem();'></form>


that is for one value, while two values you would have to get 2 text inputs.

<script language="javascript" type="text/javascript">
function insertItem(){
         var addData = '["'+document.formOne.textOne.value+'","'+document.formOne.textTwo.value'"]';
         myData.unshift(eval(rowData));
         obj.setRowCount(myData4.length);
         obj.refresh();
}
[/script]

<form name="formOne"><input type='text' name='textOne'><input type='text' name='textTwo'><input type='button' value='Add' onClick='insertItem();'></form>


Hopefully this saves someone some time. (perhaps this would be good to append to the add/delete row archived topic)
comptech
June 27,

This topic is archived.

See also:


Back to support forum