+ Start a Discussion

Script to copy one cell value to another

I want to copy the value enetered in one cells to another cell in the same row in a VF page ..


I want to copy the value of cell 5 to cell 8 in below code... any idea how this can be acheived :


var pCentVal = currentTable.rows[i].cells[4].firstChild.value;
if(pCentVal != undefined){
currentTable.rows[i].cells[5].firstChild.value = (pCentVal * totalRollCall) / 100;
I want to copy this cell 5 value to a new cell :


if(pCentVal != undefined){
currentTable.rows[i].cells[8].firstChild.value = Cell5 value // How to do it here