Hey all,
I am trying to do some error checking in my javascript code and I have ran across an issue with the visibility of an object.
I am hiding an object on the page using document.getElementById('objectname').style.display = 'none';
When I go to see if it exists using the code below (the object IS not visible on the screen at the time), nothing happens
if(document.getElementById('objectname').style.visibility == 'hidden')
{
alert('message');
}
I have also used with no avail:
if(document.getElementById('objectname').style.display == 'none')
{
alert('message');
}
Any ideas?
Showing posts with label visibility. Show all posts
Showing posts with label visibility. Show all posts
Tuesday, January 29, 2008
Subscribe to:
Posts (Atom)