Hello,

When StartCheck is called by itself this.finished no longer points to tm.finished. this.finished shows "undefined" in the alert. Can someone tell me why? Is it possible to have this.finished always point to tm.finished? Thank you!

Code:
<div id="message" title="Processing" style="height: 150px">Processing Command</div>

<script type="text/javascript">


function TIMING_ModalMessage(Interval, Window)
{
	this.finished = false;
	this.window = Window;
	this.interval = Interval
	$(this.window ).dialog({ modal: true, autoOpen: false });
}

TIMING_ModalMessage.prototype.StartCheck = function()
{
	alert(this.interval);
	if(this.finished == false) setTimeout( this.StartCheck, this.interval);
	else $(this.window ).dialog("close");
	alert(this.finished);
}

TIMING_ModalMessage.prototype.Open = function()
{
	$(this.window ).dialog("open");
	this.StartCheck();
}



var tm = new TIMING_ModalMessage(2000, $("#message"));
tm.Open();
$.post("test.php", 
 { }, 
 function(data) { tm.finished = true;  } );


</script>