How to ADD scroll bar to html table without hiding table heading

I written a program which adds scrollbars to html table…without hiding html heading.
Please help me
THIS PROGRAM IS EXECUTE SUCCESSFULLY…BUT NOT SHOWING SCROLLBAR

User Profile List
            </style>
	<script src="http://code.jquery.com/jquery-1.11.0.min.js"></script>
            <script>
	      function getdata() 
                  {
			var val=$("#txt").val();
                            $.getJSON('database.php',{age:val},function(data){
			  if(data.length>0) 
                              {$('#error').html("");
				var table = '<table border="1" id="bus_ser">';
				table += '<tr><td>'
                                         + 'User Information'
                                         + '</td><td>age</td></tr>';
                                     
			         $.each(data,function(i,element){
					table +='<tbody id="bus"><tr><td>' + element.id+'</td><td>'+element.age+'</td></tr></tbody>';
			             
                            });
				table +='</table>';  
                                $('#user_profile_content').html(table); 
			
			 }
			else {
					$('#error').html("no data found"); 
                                            $('#user_profile_content').html("");
				}
			}); 
		}
	</script>
</head>
<body>
	
        <div id="user_profile_content" ></div>
            <div id="error"></div>
            <input type="text" id="txt" >
            <input type="submit" value="submit"  onclick="getdata();">
</body>

I didn’t check out your code, but are you getting enough data for for the scroll bar to show?

Something like this?

http://jsfiddle.net/TweNm/

The idea is to wrap the

in a non-statically positioned
which has an overflow:auto CSS property. Then position the elements in the
absolutely.

For Web Apps visit ati-erp.com

Just an example but maybe something like this body {height:101%; } or in the

tag itself?
Sponsor our Newsletter | Privacy Policy | Terms of Service