ekendricks
Posts: 34
|
Posted: 06/15/2004, 4:11 PM |
|
I have a add record grid, that will auto add an additional row for data entry. What I would like to accomplish is, upon entering the new row for data entry, is to populate some of the text boxes with data from the previous row. This would negate the need to complete each box manually when the required data is the same. Keeping in mind that data in the form at this point have not been written/saved to the database, retrieving the record/entry would not be useful.
Any ideas and or suggestions would be appreciated.
Thanks
ELK
|
|
|
peterr
Posts: 5971
|
Posted: 06/15/2004, 4:27 PM |
|
Try this experiment with the "EditableGridAddButton" example in CCS Example Pack:
1. In the HTML add id="department" into the <input> tag of the departments field, then add id="manager_id" into the <select> tag of the manager field; so that both fields can be accessed by the id.
2. At the end of the Javascript function "page_departments_AddRowBtn_OnClick()" that you will find within that page, add this code:
document.all.item('department',i-1).value = document.all.item('department',i-2).value;
document.all.item('manager_id',i-1).value = document.all.item('manager_id',i-2).value;
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com |
|
|
|