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
chanti kchanti k 

copy field values of one filed to another filed in same visualforce page ?

Hi,

i Have Two fileds in visualforce page. Those fileds are Prod1 And Prod2 both are test fileds. i want to insert the values of Prod1 fields into Prodf2 fields. Please put me some code on this .
EX: prod1:Test1
Prod2:Test1

Thanks,
Chanti
Nachu RY 4Nachu RY 4
Hi,

<apex:page >
    <html>
        <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
        <script>
            $(document).ready(function(){
                $('#name').keyup(function() {
                    $('#replicate').val($(this).val());
                });    
            });
        </script>
        <body>
            Prod1 :   <input type="text" name="name" id="name" size="30"  class="text-input" /> <br/><br/><br/>
            Prod2 : <input type="text" name="name" id="replicate" size="30"  class="text-input" />
        </body>
    </html>
</apex:page>

Thanks.