function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
RajeevlsHydRajeevlsHyd 

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 :

like


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

}

 

----------------------------------------------------------------------------------------------------------