Claim your Biolink Click Here
0 like 0 dislike
278 views
in Education & Reference by (80 points) | 278 views

1 Answer

1 like 0 dislike
<script type="text/javascript">
function myfunction(counter) {
    var a=document.getElementById("tbl");
	  if ( a.hasChildNodes() ){
        while ( a.childNodes.length >= 1 )
            {
            a.removeChild( a.firstChild );       
            } 
        }
		 var row1=document.createElement("TR");
        a.appendChild(row1);
   
            var col4=document.createElement("TD"); 
            row1.appendChild(col4);
            col4.setAttribute("class","heading");
            $(".heading").html("cidMember");
			var col5=document.createElement("TD"); 
            row1.appendChild(col5);
            col5.setAttribute("class","heading1");
            $(".heading1").html("select");
			
    
    for (var i=1;i<=counter;i++) {
var num = i;
var num = num < 10 ? "0"+num : num;
        var row=document.createElement("TR");
        a.appendChild(row);
   
            var col1=document.createElement("TD"); 
            row.appendChild(col1);
            col1.setAttribute("class","column"+i);
            $(".column"+i).html("<?php echo $_GET[cid]?>"+num);
			
			var col2=document.createElement("TD"); 
            row.appendChild(col2);
            col2.setAttribute("class","colmn"+i);
            $(".colmn"+i).html('<input type="checkbox" value="<?php echo $_GET[cid]?>'+num+'" name="check'+i+'"  checked>');
			
			
       
    }
       
    }

HTML

<font size="+1">how many checkbox you want</font>
           <select id="exten" onchange="myfunction(this.value)">
               
<?php 
for ($i = 1; $i <26; $i++) {
    $num = $i;
    $num = $num < 10 ? "0$num" : $num;
?>
<option value="<?php echo $num;?>"><?php echo $num;?></option>
<?php } ?>
</select>
by (-30 points)

Related questions

0 like 0 dislike
2 answers
2 like 0 dislike
1 answer
0 like 0 dislike
2 answers
0 like 0 dislike
1 answer
asked Jan 22, 2016 in Education & Reference by Krish (1.1k points) | 402 views
1 like 0 dislike
1 answer
0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
1 like 0 dislike
2 answers

Where your donation goes
Technology: We will utilize your donation for development, server maintenance and bandwidth management, etc for our site.

Employee and Projects: We have only 15 employees. They are involved in a wide sort of project works. Your valuable donation will definitely boost their work efficiency.

How can I earn points?
Awarded a Best Answer 10 points
Answer questions 10 points
Asking Question -20 points

1,310 questions
1,471 answers
569 comments
4,809 users