how can i know if element is not exists in document
im trying to know if some html object is on the document
but when i try simple :
alert(document["foo"].id) it even don't alert the alert...
by the way in this example there is no foo object .
so.. how can i know if object is NOT exists??