set each textbox value with jquery

potongan jquery sintax :
 $( document ).on( 'click', '#copyall', function( e ) {    
   var allotment = $('#AllotmentToAll').val();    
   $('#allotment').each( function() {  
     $('.allotment').val(allotment);  
   });   
 });  
potongan sintax php pada framework yii :
 echo CHtml::textField('AllotmentToAll','','',array('id'=>'AllotmentToAll'));  
         echo CHtml::button('Copy To All', array('id'=>"copyall"));  
         $totDay = date('t', strtotime('2013-01'));  
         echo "<br />";  
         echo "<table border=1>";  
         echo '<tr>';  
         for($i=1; $i<=$totDay; $i++){  
           echo '<td>';  
           echo "2013-01-$i <br />";  
           echo CHtml::textField('allotment[]', '', array('id'=>"allotment", 'class'=>"allotment", 'size'=>'10px'));  
           echo "</td>";    
           if($i % 4 ==0){  
             echo "</tr>";  
           }  
           echo "";  
         }  
         echo '</table>';  

Comments

Popular posts from this blog

Review Pemakaian Lenovo K900 Mati Total (Matot)

VERIFIKASI SUARA MENGGUNAKAN METODE MFCC DAN DTW MENGGUNAKAN METODE MFCC DAN DTW (BAB II TINJAUAN PUSTAKA)

cara daftar di DMOZ