Here in my code i am getting first field value only.

<apex:page standardController="Entertainment__c" extensions="ScreenDetailController" sidebar="false" showHeader="false" docType="xhtml-1.0-strict">
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
        function TotalVal(){
            var x ;
            for(var i=0;i< $('select[id$=ScreenValueID]').val() ; i++){
                x = document.getElementById("Audi").value;
            document.getElementById("total").value = document.getElementById("Audi").value;
    <apex:form >
        <b>Screen :</b><apex:selectlist value="{!picklistselectedvalue}" id="ScreenValueID" size="1">
            <apex:selectOptions value="{!items}"/>
            <apex:actionSupport event="onchange" action="{!SortTheList}"/>
        <apex:pageBlock >
            <apex:pageBlockSection >
                <apex:pageblockTable value="{!data}" var="e">
                    <apex:column >
                        <B>Audi {!e.count}</B>
                    <apex:column >
                        <input value="{!e.name}" id="Audi" onblur="TotalVal()"/>
             <b>Total :</b><output id="total"/>
  • Hi Rahul, welcome to SFSE. With the information you have provided, its not very clear as what are you trying to achieve and what is your issue. Please take a moment on How to Ask, and also recommend you to edit your post so that you can provide much more details, relevant code snippet, your issue and your effort to resolve this. Providing these details will help your question get more attention and thus resolution. – Jayant Das Aug 22 '18 at 15:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.