I just try to get the field value from inputField, that inside apex:column tag in PageBlockTable. I'v tried a different ways, but still no result. I've tried the next methods:
function testinputJS(elem){
alert(j$(elem).find(".accId").html());
}
document.getElementById('{!$Component.Form.PageBlock.screens.sec.f2b.t.testinput}').value;
document.getElementById('testinput').value;
Here is my page:
<apex:page tabStyle="Fee_Schedules__c" controller="CommissionController" sidebar="false" doctype="html-5.0">
<apex:includeScript value="//ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" />
<script type="text/javascript">
j$ = jQuery.noConflict();
function testinputJS(elem){
alert(j$(elem).find(".accId").html());
}
</script>
<apex:form id="Form">
<apex:sectionHeader subtitle="Commission Settings Wizard"/>
<apex:outputPanel >
<apex:pageMessages escape="false" id="messages"/>
</apex:outputPanel>
<apex:PageBlock id="PageBlock">
<apex:pageBlockButtons location="bottom">
<apex:outputPanel id="buttons">
<apex:actionStatus id="prevActionStatus" >
<apex:facet name="start" >
<img src="/img/loading.gif" />
</apex:facet>
<apex:facet name="stop">
<apex:commandButton id="prev" value="{!$Label.Prev}" rendered="{!NOT(FORM1)}" action="{!prev}" style="padding: 5px;" status="prevActionStatus" reRender="messages,screens,buttons" immediate="true"/>
</apex:facet>
</apex:actionStatus>
<apex:actionStatus id="nextActionStatus" >
<apex:facet name="start" >
<img src="/img/loading.gif" />
</apex:facet>
<apex:facet name="stop">
<apex:commandButton id="next" value="{!$Label.Next}" rendered="{!FORM1 || FORM2 || FORM2SET}" action="{!next}" style="padding: 5px;" status="nextActionStatus" reRender="messages,screens,buttons"/>
</apex:facet>
</apex:actionStatus>
<apex:actionStatus id="saveActionStatus" >
<apex:facet name="start" >
<img src="/img/loading.gif" />
</apex:facet>
<apex:facet name="stop">
<apex:commandButton id="save" value="{!$Label.Save}" rendered="{!NOT(FORM1) && NOT(FORM2) && NOT(FORM2SET)}" action="{!Save}" style="padding: 5px;" status="nextActionStatus" reRender="messages,screens,buttons"/>
</apex:facet>
</apex:actionStatus>
</apex:outputPanel>
<button style="padding: 5px;" onclick="javascript:top.location.assign('{!ReturnUrl}');return false;">{!$Label.Back}</button>
</apex:pageBlockButtons>
<apex:outputPanel id="screens">
<style type="text/css">
.Dependent {color: black;}
select:disabled {
background: #ffffff;
color: #000000;
}
</style>
<apex:pageBlockSection title="{!PageBlockTitle}" columns="1" id="sec">
<apex:outputPanel rendered="{!FORM1}">
Please choose setting:
<apex:pageBlockSectionItem >
<apex:outputPanel >
<div class="requiredInput requiredInput-bcs">
<div class="requiredBlock"></div>
<apex:selectRadio value="{!SelectedSetting}" label="Type" layout="pageDirection" required="true">
<apex:selectOptions value="{!Settings}" />
</apex:selectRadio>
</div>
</apex:outputPanel>
</apex:pageBlockSectionItem>
</apex:outputPanel>
<apex:outputPanel rendered="{!FORM2}">
Please choose venue:
<apex:pageBlockSectionItem >
<apex:outputPanel >
<div class="requiredInput requiredInput-bcs">
<div class="requiredBlock"></div>
<apex:selectRadio value="{!SelectedVenue}" label="Type" layout="pageDirection" required="true" immediate="true">
<apex:selectOptions value="{!Venues}" />
</apex:selectRadio>
</div>
</apex:outputPanel>
</apex:pageBlockSectionItem>
</apex:outputPanel>
<apex:outputPanel rendered="{!FORM2SET}">
Please choose setting:
<apex:pageBlockSectionItem >
<apex:outputPanel >
<div class="requiredInput requiredInput-bcs">
<div class="requiredBlock"></div>
<apex:selectRadio value="{!SelectedChoices}" label="Type" layout="pageDirection" required="true">
<apex:selectOptions value="{!Choices}" />
</apex:selectRadio>
</div>
</apex:outputPanel>
</apex:pageBlockSectionItem>
</apex:outputPanel>
<apex:outputPanel rendered="{!FORM2AOTC}">
<apex:PageBlockTable value="{!OTC}" var="f" style="width:70%">
<apex:column headerValue="Market/Venue" value="{!f.Commission_for__c}"/>
<apex:column headerValue="Rate">
<apex:InputField value="{!f.Rate__c}" />
</apex:column>
<apex:column headerValue="Rate Units" value="{!f.Rate_Units__c}"/>
<apex:column headerValue="Clearing and Exchange fees" value="{!f.X3rd_party_costs__c}"/>
<apex:column headerValue="Payment Currency " value="{!f.Payment_Currency__c}"/>
<apex:column headerValue="Payment date" value="{!f.Payment_Date__c}" />
<apex:column headerValue="Minimum Commission" >
<apex:repeat value="{!MinimumChargeOTC}" var="m">
<apex:InputField value="{!m.Rate__c}" />
</apex:repeat>
</apex:column>
</apex:PageBlockTable>
</apex:outputPanel>
<apex:outputPanel rendered="{!FORM2AOther}">
<apex:PageBlockTable value="{!Flat}" var="f" style="width:70%">
<apex:column headerValue="Market/Venue">
<apex:InputField value="{!f.Commission_for__c}" html-disabled="true" styleClass="disabled"/>
</apex:column>
<apex:column headerValue="Rate">
<apex:InputField value="{!f.Rate__c}" />
</apex:column>
<apex:column headerValue="Rate Units" value="{!f.Rate_Units__c}"/>
<apex:column headerValue="Clearing and Exchange fees">
<apex:inputField value="{!f.X3rd_party_costs__c}"/>
</apex:column>
<apex:column headerValue="Payment Currency">
<apex:inputField value="{!f.Payment_Currency__c}"/>
</apex:column>
<apex:column headerValue="Payment date" value="{!f.Payment_Date__c}" />
<apex:column headerValue="Minimum Commission" >
<apex:repeat value="{!MinimumChargeOTC}" var="m">
<apex:InputField value="{!m.Rate__c}" />
</apex:repeat>
</apex:column>
</apex:PageBlockTable>
</apex:outputPanel>
<apex:outputPanel rendered="{!FORM2B}" id="f2b">
<apex:pageBlockSection columns="1">
<apex:pageblockSectionItem >
Market/Venue:<apex:outputLabel value="{!SelectedVenue}"/>
</apex:pageblockSectionItem>
<apex:pageblockSectionItem >
<apex:outputLabel value="Clearing and Exchange fees:" />
<apex:outputPanel >
<div class="requiredInput">
<div class="requiredBlock"></div>
<apex:SelectList size="1" value="{!Sel3rdPartyCosts}" required="true">
<apex:selectOptions value="{!X3rdPartyCosts}"/>
</apex:SelectList>
</div>
</apex:outputPanel>
</apex:pageblockSectionItem>
<apex:pageblockSectionItem >
<apex:outputLabel value="Payment Currency:" />
<apex:outputPanel >
<div class="requiredInput">
<div class="requiredBlock"></div>
<apex:SelectList size="1" value="{!SelPaymentCurrency}" required="true">
<apex:selectOptions value="{!PaymentCurrency}"/>
</apex:SelectList>
</div>
</apex:outputPanel>
</apex:pageblockSectionItem>
<apex:pageblockSectionItem >
Payment date:<apex:outputLabel value="Monthly"/>
</apex:pageblockSectionItem>
</apex:pageBlockSection>
<apex:PageBlockTable value="{!Scale}" var="f" style="width:70%" id="t">
<apex:column headerValue="Rate" id="col" >
<apex:InputField value="{!f.Rate__c}" id="testinput" onchange="testinputJS(this);" styleClass="accId"/>
</apex:column>
<apex:column headerValue="Rate Units" value="{!f.Rate_Units__c}"/>
<apex:column headerValue="Volume From">
<apex:InputField value="{!f.Volume_from__c}" html-disabled="true" styleClass="disabled"/>
</apex:column>
<apex:column headerValue="Volume To">
<apex:InputField value="{!f.Volume_to__c}"/>
</apex:column>
<apex:column headerValue="Volume Units" value="{!f.Volume_units__c}"/>
</apex:PageBlockTable>
<apex:commandbutton value="Add" action="{!Add}"/>
<apex:commandbutton value="Remove" action="{!Remove}"/>
</apex:outputPanel>
<apex:outputPanel rendered="{!FORM2D}">
<apex:PageBlockTable value="{!MonthlyFixed}" var="f" style="width:70%">
<apex:column headerValue="Market/Venue" value="{!f.Commission_for__c}"/>
<apex:column headerValue="Rate">
<apex:InputField value="{!f.Rate__c}" />
</apex:column>
<apex:column headerValue="Payment Currency " value="{!f.CurrencyISOCode}"/>
<apex:column headerValue="Clearing and Exchange fees" value="{!f.X3rd_party_costs__c}"/>
<apex:column headerValue="Payment date" value="{!f.Payment_Date__c}" />
</apex:PageBlockTable>
</apex:outputPanel>
<apex:outputPanel rendered="{!FORM1A}">
<apex:PageMessage summary="<u>Please Note:</u> <b>Margin Ledning Rate = Benchmark rate + Fee rate</b>" severity="Info" escape="false"/>
<apex:PageBlockTable value="{!Margin}" var="M" style="width:40%">
<apex:column headerValue="Commission Name">
<apex:InputField value="{!M.Commission_for__c}" html-disabled="true" styleClass="disabled"/>
</apex:column>
<apex:column headerValue="Benchmark rate" value="{!M.Benchmark__c}"/>
<apex:column headerValue="Fee">
<apex:InputField value="{!M.Rate__c}" />
</apex:column>
<apex:column headerValue="Fee Units" value="{!M.Rate_Units__c}"/>
<apex:column headerValue="Payment date">
<apex:InputField value="{!M.Payment_Date__c}"/>
</apex:column>
</apex:PageBlockTable>
</apex:outputPanel>
<apex:outputPanel rendered="{!FORM1B}">
<apex:PageBlockTable value="{!Other}" var="OT" style="width:35%">
<apex:column headerValue="Commission Name" value="{!OT.Commission_for__c}"/>
<apex:column headerValue="Rate">
<apex:InputField value="{!OT.Rate__c}"/>
</apex:column>
<apex:column headerValue="Rate Units" value="{!OT.Rate_Units__c}"/>
<apex:column headerValue="3rd party costs" value="{!OT.X3rd_party_costs__c}"/>
</apex:PageBlockTable>
</apex:outputPanel>
</apex:pageBlockSection>
</apex:outputPanel>
</apex:PageBlock>