08-08-2008

Javascript Repeatedly check if an object in a sibling frame is loaded.

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);

Comments:

Your comment:

»

 

[x]