udaybabu
10-02-2012, 10:24 AM
Hello i have select box and one table, in select box i have 1 to 5 numbers if i select 2 from select box the table should be show 2 times.
Here is my code..
<script type="text/javascript">
$(document).ready(function(){
$('#Lessons').change(function(){
var lesNum = $('#Lessons').val();
for(k=1;k<=lesNum;k++){
$("#xyz").css("display", "block");
}
});
});
</script>
and my table code is here
<select id="Lessons" name="Lessons">
<?php for($j=1;$j<=5;$j++):?>
<option value="<?=$j?>"><?=$j?></option>
<?php endfor;?>
</select>
<div id="xyz" style="display:none;">
<table>
//some table data goes here.
</table>
</div>
anyone Help me out .. /uday
Here is my code..
<script type="text/javascript">
$(document).ready(function(){
$('#Lessons').change(function(){
var lesNum = $('#Lessons').val();
for(k=1;k<=lesNum;k++){
$("#xyz").css("display", "block");
}
});
});
</script>
and my table code is here
<select id="Lessons" name="Lessons">
<?php for($j=1;$j<=5;$j++):?>
<option value="<?=$j?>"><?=$j?></option>
<?php endfor;?>
</select>
<div id="xyz" style="display:none;">
<table>
//some table data goes here.
</table>
</div>
anyone Help me out .. /uday