Clayf700
01-01-2011, 08:37 PM
you see, my problem is that i'm trying to make an object disappear without changing the "display:block or display:none" in css. because for some reason it screws up my alignments when i set my tables to 100% in width or height. sometimes it even screws up the height or width
here's the code that toggles from appearing to disappearing
function Appear(itemID){
// Toggle visibility between none and inline
if ((document.getElementById(itemID).style.display == 'none'))
{
document.getElementById(itemID).style.display = 'inline';
} else {
document.getElementById(itemID).style.display = 'none';
}
}
and then i use this also
onclick="Appear('Whatever');return false"
how would i toggle without using css?
Or At least do it in a different method?
here's the code that toggles from appearing to disappearing
function Appear(itemID){
// Toggle visibility between none and inline
if ((document.getElementById(itemID).style.display == 'none'))
{
document.getElementById(itemID).style.display = 'inline';
} else {
document.getElementById(itemID).style.display = 'none';
}
}
and then i use this also
onclick="Appear('Whatever');return false"
how would i toggle without using css?
Or At least do it in a different method?