0 like 0 dislike
34 views
asked Jun 16, 2014 in Education & Reference by Bhuwnesh Nautiyal (160 points) | 34 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>
answered Jun 17, 2014 by Bhoomika (50 points)

Related questions

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

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

Mathe Forum Schule und Studenten
1,149 questions
1,279 answers
262 comments
1,504 users