Showing/Hiding Div
I am using asp.net ajax control toolkit 1.0 on vs 2005. I am using the collapseablePanel and AlwaysVisibleControlExtender control. When I use these, I notice that it my panel flash
Solution 1:
You are trying to show it by setting the visibility but you hid it using display.
You actually want something like this:
document.getElementbyId('menuContent').style.display = 'block';
Solution 2:
Maybe this is what you're looking for
Javascript function:
function showHide(descriptor)
{
var layer = document.getElementById(descriptor);
if (layer != null) {
if (layer.style.display != 'none') {
layer.style.display = 'none'; //hide layer
} else {
layer.style.display = 'block';//show layer
}
}
}
HTML:
<a href="javascript:showHide('divInfo');"><img id="imgInfo" src="info.gif" border="0" /></a>
<div style="display: none;" id="divInfo">some info</div>
Solution 3:
Basically had to use Visibility hidden and visible attributes as these work best on a collapsePanel
Post a Comment for "Showing/Hiding Div"