:: Forum >>

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
Wednesday, June 27, 2007

This topic is archived.


Back to support forum

Forum search