Conversation Between jhardman and kirkgilbert
Showing Visitor Messages 1 to 4 of 4 -
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="docopycat(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.getElementById(x).value
var x=document.getElementById("GPRICE2_<%=FO("ID")%>") .value
document.getElementById("UNPRCE3_<%=FO("ID")%>").v alue = x- y
}
</script> -
I made the changes that you suggested. Without applying the loop the page works similar as before. If I have 2 rows of data and lets say I update the second row it is doing the onchange event of row 1. I am still not sure where to apply the loop.
************************************************** ***********************************
<input name="REVUNPRCE_<%=FO("ID")%>" type="text" id="REVUNPRCE_<%=FO("ID")%>" onChange="docopycat(this.id)" value="<%= FormatNumber((0.00),2,-2,-2,-2)%>" size="4">
************************************************** ***********************************
Would it be right after the code displayed above and if so, everytime I ran the page I received an error. And thank you for you patience in this matter -
I understand exactly what you are saying, I am just not sure where to apply what you are saying. As stated earlier I am new to ASP, so I am working my way through different projects trying to get the hang of it. Could you please so me in the code I have provide where to apply the loop -
I am new to ASP could you show me what you are referring to when you say to place an (x) in the name and ID of the text field and then in the javascript | |