Thanx Cups, I have already done setting the timer but without giving an alert. Close the window after certain seconds. I am not sure how must this method is good. when i submit the comment form on the pop up then i did like this:
Code:
function frmReportValidate(fm){
if(fm.comments.value == "" || fm.comments.length == 0){
alert('Please type at least some comments.');
fm.comments.focus();
return false;
}
fm.action = '../ip6/progress_report_export.php';
fm.method = 'post';
fm.submit();
TimerRaju();
}
var secs = 1;
function TimerRaju(){
if (secs == 10){
self.close();
}
secs = secs + 1;
timerID = self.setTimeout("TimerRaju()", 1000);
}
<form name="frmreportcomment" onSubmit="return frmReportValidate(this);">
form elements...
</form>
Bookmarks