Expand my Community achievements bar.

Update Date

Avatar

Former Community Member
Hi



I have a Table, a textbox and button



the content of textbox would update a new row of table when press button



each row created with button is update with textbox value



How is that



Thanks



Juan
1 Reply

Avatar

Former Community Member
You can do using the table row's Instance Manager object.



Using the Instance Manager, you can add an instance of a table row and get back the new instance as an object which you can then use to access its cells.



In your request, you indicated that you'd like to have a text field and a button. When you click on the button, the value from the text field is used to add a new row to a table. I'm assuming that the rows in the table are text fields and that the new rows get their text field cell set to the text field's value.



On the button's Click event, you simply need the following JavaScript:



// add new row and set object

var oNewRow = Table1.
_Row1.addInstance(true);



// set the row's text field's value to the source text field's value

oNewRow.TextFieldCell.rawValue = SourceTextField.rawValue;


Notice the use of the special
_Row1 object. This is the Instance Manager for the table row named
Row1.



I've attached a sample form which demonstrates this script.



Let me know if you have any questions.



Stefan

Adobe Systems