[thelist] Opera 7 and hiding DIVs
Ryan Tames
rytames at telusplanet.net
Thu Aug 14 06:12:38 CDT 2003
On 13 Aug 2003 at 23:08, jsWalter wrote:
> Can someone tell me why this does not work in Opera7?
this code Works for me in (all browsers that i tested):
rollUp is hiding the div, and rolldown is showing the div.
Maybe the code will help?
==========================
// Roll Div (css display) up/down
function divRollUp( divId )
{
if ( document.getElementById ) {
document.getElementById(divId).style.display = 'none';
} else if ( document.all ) {
document.all[divId].style.display = 'none';
}
}
function divRollDown( divId )
{
if ( document.getElementById ) {
document.getElementById(divId).style.display = 'block';
} else if ( document.all ) {
document.all[divId].style.display = 'block';
}
}
==========================
On a side note, Opera7 does not load the image content
of a hidden div, which I thought was pretty cool.
> function showRegion( strRegionID )
> {
> // Do we have any Object to play with?
> if ( typeof ( strPreviousRegionID ) == "undefined" )
> strPreviousRegionID = 'eps_info'
>
> // Hide current Region
> document.getElementById(strPreviousRegionID).style.visibility="hidd
> en" ;
> document.getElementById(strPreviousRegionID).style.display="none" ;
>
> // Show new Region
> document.getElementById(strRegionID).style.visibility="visible" ;
> document.getElementById(strRegionID).style.display="block" ;
>
> // Make current Region the Previous Region
> strPreviousRegionID = strRegionName;
> }
Ryan Tames.
Portfolio: http://portfolio.tames.2y.net/
PGP Public key: finger webmaster at tames.2y.net
More information about the thelist
mailing list