0

Hello.
I have a form in my website that I want to hide at page load. But after the page load, there remains empty space. The form is inside the table. So, I tried resizing table with following code. But its not working.

<script type="text/javascript">
		function HideForm()
			{
				document.getElementById('emf-form').style.visibility='hidden';
				document.getElementById('page2').style.height='200px';
				
			}
	</script>
2
Contributors
2
Replies
3
Views
7 Years
Discussion Span
Last Post by rajbdilip
0

To hide an element without it still taking up the physical space on the page you need to use the property for display not for visibility. Visibility will leave elements in the flow of the document where display:none will remove it from the flow.

document.getElementById('emf-form').style.display='none';
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.