On CheckBox: Value Populate from On Text box to Other Using Jquery



 <script src="//code.jquery.com/jquery-1.11.2.min.js"></script>
 function switchpartnumber(switchpartnoid)
        {
            try {
                alert(switchpartnoid);
                if(document.getElementById(switchpartnoid).checked == true){
                    var switchpartno = $(".InputtestClass").val();
                    $(".outputtestClass").val(switchpartno);
      
                }
            } catch (e) { alert('Internal Error!'+e) }
            
        }

</script>

 <apex:inputField type="CheckBox"onchange="switchpartnumber(this.id);">

 <apex:inputField styleClass="InputtestClass" />
 <apex:inputField styleClass="outputtestClass"/>

Comments

Popular posts from this blog

Salesforce Spring 16 Release Exam (Maintenance Exam Q&A) for Developer 201 Admin

Show Hyper Link On Add Error in Salesforce Trigger

Show the Success Message before Redirecting the Detail page on Visualforce Page