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
AKS018AKS018 

Jquery for OutputField and inputhidden fields.

Hi,

      How to assign a value to the Outputfield and to display in the page.

and also how to assign a value to the InputHidden in the visual force page.

 

In my page I have the fields like

 

<apex:outputfield value="{!t.sobj.TaxRate__c}" id="taxRateType" />

<apex:inputHidden value="{!t.sobj.ServiceRate__c}" id="hidServiceRate" />

 

 

Please tell me how to write in Jquery to assign values for the above fields.

Adam HowarthAdam Howarth

Hey,

 

Try this:

 

<apex:outputfield value="{!t.sobj.TaxRate__c}" id="taxRateType" styleClass="taxRateType" />

<apex:inputHidden value="{!t.sobj.ServiceRate__c}" id="hidServiceRate" styleClass="hidServiceRate" />

 

<script>
function addValues()
{
$('.taxRateType).val('taxRateValue');
$('.hidServiceRate).val('hidServiceRateValue');
}
</script>

 

Cheers

 

AKS018AKS018
Hi Adams,
Thanks for ur reply.
Actually there are number of rows in a table.According to that ,I wrote like this its not working.can you suggest me..
$("input[id$=':" + row + ":taxRateType']").val(result[0].TaxRate__c);