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