Will keep on checking till it finds the element in the addressed frame and only execute your code when it's there. Can be used for instance to check if the document object in the addressed frame is ready etc.
elementChecker = setInterval(function (){ if(parent.frames[0].objectName){ clearInterval(elementChecker); alert(parent.frames[0].objectname); } },100);