You need to sign in to do that
Don't have an account?

Change value of checked row field jquery
Hi SFDC Dev,
Here's my problem. I want to copy the value of the inputfield named "CopyToValue" to the selected fields on the table.

Thanks everybody.
Here's my problem. I want to copy the value of the inputfield named "CopyToValue" to the selected fields on the table.
<apex:inputText id="ValueToCopy" value="{!ForecastingQuota.QuotaAmount}" required="false"/> <apex:commandButton value="Assign to Selected Users" reRender="allquotas" onclick="copyQuotaAmount();"/> <br/> <br/> <apex:pageBlockSection columns="4" id="allquotas"> <apex:pageBlockTable value="{!allthequotas}" id="table" var="key"> <apex:facet name="header"> <input type="checkbox" id="checkAllBox" onchange="toggleCheckAll(this)"/> Select All </apex:facet> <apex:column> <apex:inputCheckbox styleClass="selectInput"/> </apex:column> <apex:column headerValue="Name"> <apex:outputField value="{!key.QuotaOwnerId}"/> </apex:column> <apex:column headerValue="Quota"> <apex:inputField value="{!key.QuotaAmount}" required="false" id="test"/> </apex:column> <apex:column headerValue="Date"> <apex:inputField value="{!key.StartDate}" required="false"/> </apex:column> </apex:pageBlockTable> <apex:pageBlockTable value="{!allthequotas2}" var="key2"> <apex:facet name="header"> <input type="checkbox" id="checkAllBox2" onchange="toggleCheckAll2(this)"/> Select All </apex:facet> <apex:column> <apex:inputCheckbox styleClass="selectInput2"/> </apex:column> <apex:column headerValue="Name"> <apex:outputField value="{!key2.QuotaOwnerId}"/> </apex:column> <apex:column headerValue="Quota"> <apex:inputField value="{!key2.QuotaAmount}" required="false" id="test"/> </apex:column> <apex:column headerValue="Date"> <apex:inputField value="{!key2.StartDate}" required="false"/> </apex:column> </apex:pageBlockTable> <apex:pageBlockTable value="{!allthequotas3}" var="key3"> <apex:facet name="header"> <input type="checkbox" id="checkAllBox3" onchange="toggleCheckAll3(this)"/> Select All </apex:facet> <apex:column> <apex:inputCheckbox styleClass="selectInput3"/> </apex:column> <apex:column headerValue="Name"> <apex:outputField value="{!key3.QuotaOwnerId}"/> </apex:column> <apex:column headerValue="Quota"> <apex:inputField value="{!key3.QuotaAmount}" required="false" id="test"/> </apex:column> <apex:column headerValue="Date"> <apex:inputField value="{!key3.StartDate}" required="false"/> </apex:column> </apex:pageBlockTable> <apex:pageBlockTable value="{!allthequotas4}" var="key4"> <apex:facet name="header"> <input type="checkbox" id="checkAllBox4" onchange="toggleCheckAll4(this)"/> Select All </apex:facet> <apex:column> <apex:inputCheckbox styleClass="selectInput4"/> </apex:column> <apex:column headerValue="Name"> <apex:outputField value="{!key4.QuotaOwnerId}"/> </apex:column> <apex:column headerValue="Quota"> <apex:inputField value="{!key4.QuotaAmount}" required="false" id="test"/> </apex:column> <apex:column headerValue="Date"> <apex:inputField value="{!key4.StartDate}" required="false"/> </apex:column> </apex:pageBlockTable> </apex:pageBlockSection> <script type="text/javascript"> function copyQuotaAmount() { $("input[id$='test']").val($("input[id$='ValueToCopy']").val()); return false; } </script>I just don't know how to do in JQuery. See the screenshot, I want to put the value "123" (in yellow) to the selected fields of the table.
Thanks everybody.