Through the timer pop-up Prompt window, Many OA has this function
<SCRIPT>
Function OpenWindow (Win, wintitle, winwidth, winheight)
{
VaR winleft = Window. Screen. width-winWidth-12;
VaR wintop = Window. Screen. height-winHeight-75;
Window. open (Win, wintitle, 'width = '+ winwidth + 'px, Height =' + winheight + 'px, Left = '+ winleft + 'px, top = '+ wintop + 'px, scrollbars = 1, status = 0 ');
}
</SCRIPT>
<Script language = "JavaScript" type = "text/JavaScript" src = "../JS/ajax. js"> </SCRIPT>
<Script language = "JavaScript" type = "text/JavaScript">
Function check (typestr)
{
VaR myurl = "tip. aspx? Type = "+ typestr;
VaR mywebsend = "";
XMLHTTP. Open ("Post", myurl, true );
XMLHTTP. setRequestHeader ("Content-Type", "application/X-WWW-form-urlencoded ");
XMLHTTP. onreadystatechange = validatecallback;
XMLHTTP. Send (mywebsend );
}
Function checknormal ()
{
Check ('normal ');
Window. setTimeout ("checknormal ()", 60000 );
}
Function checkcalendar ()
{
Check ('calendar ');
Window. setTimeout ("checkcalendar ()", 1200000 );
}
Function validatecallback ()
{
If (XMLHTTP. readystate = 4)
{
If (XMLHTTP. Status = 200)
{
VaR result = XMLHTTP. responsetext;
If (result. indexof ("exist:") = 0)
{
OpenWindow ('poptip. aspx ', 'swindows', '123', '123 ');
}
}
Else
{
}
}
}
</SCRIPT>
</Head>
<Body onload = "checknormal (); checkcalendar ();">
Bind data to PopTop
<SCRIPT>
Focus ();
Timestart = 30;
Function mytimer ()
{
If (timestart = 0)
Window. Close ();
If (document. getelementbyid ("timeshow "))
Document. getelementbyid ("timeshow"). innerhtml = timestart;
Timestart --;
VaR timer = setTimeout ("mytimer ()", 1000 );
}