I understand what you’ve written, for the most part. What I don’t seem to be able to do is this:
Adding the unique ID and passing that to my JavaScript works
<input name="REVUNPRCE _<%=FO("ID")%> " type="text" id=<%=FO("ID")% > onChange="docop ycat(this.id)" value="<%= FormatNumber((0 .00),2,-2,-2,-2)%>" size="4">
However, what it does is use the instance of REVUNPRCE I am on, which is great, but then uses the first instance of GPRICE2 in the calculation and places the result in the first instance of UNPRCE3. I need it to use the same record I am on and not the first record. I am completely stumped.
function docopycat(x)
{
var y=document.getE lementById(x).v alue
var x=document.getE lementById("GPR ICE2_<%=FO("ID" )%>").value
document.getEle mentById("UNPRC E3_<%=FO("ID")% >").value = x- y
}
</script>
Adding the unique ID and passing that to my JavaScript works
<input name="REVUNPRCE _<%=FO("ID")%> " type="text" id=<%=FO("ID")% > onChange="docop ycat(this.id)" value="<%= FormatNumber((0 .00),2,-2,-2,-2)%>" size="4">
However, what it does is use the instance of REVUNPRCE I am on, which is great, but then uses the first instance of GPRICE2 in the calculation and places the result in the first instance of UNPRCE3. I need it to use the same record I am on and not the first record. I am completely stumped.
function docopycat(x)
{
var y=document.getE lementById(x).v alue
var x=document.getE lementById("GPR ICE2_<%=FO("ID" )%>").value
document.getEle mentById("UNPRC E3_<%=FO("ID")% >").value = x- y
}
</script>