From: Anjo K. <an...@us...> - 2005-12-02 16:24:49
|
Update of /cvsroot/wonder/Wonder/Common/Frameworks/ERExtensions/Components/Nonlocalized.lproj/ERXJSLifebeat.wo In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24179/Components/Nonlocalized.lproj/ERXJSLifebeat.wo Added Files: ERXJSLifebeat.html ERXJSLifebeat.wod ERXJSLifebeat.woo Log Message: ERXJSLifebeat added --- NEW FILE: ERXJSLifebeat.html --- <script type="text/javascript"> <!-- var erxKeepAliveUrl = "<webobject name="Link"></webobject>"; var erxKeepAlive = null; try { erxKeepAlive = new XMLHttpRequest(); } catch (e) { try { erxKeepAlive = new ActiveXObject("Msxml2.XMLHTTP"); } catch(e) { try { erxKeepAlive=new ActiveXObject("Microsoft.XMLHTTP"); } catch(e) { } } } if(erxKeepAlive) { erxKeepAlive.onreadystatechange = function() { if(erxKeepAlive.readyState==4) { // do something? } }; erxKeepAlive.poll = new function() { var date = new Date(); var myUrl = erxKeepAliveUrl; myUrl = myUrl + "&r=" + (new Date()).getTime(); erxKeepAlive.open("GET", myUrl, false); erxKeepAlive.send(null); }; window.setInterval( function() { var date = new Date(); var myUrl = erxKeepAliveUrl; myUrl = myUrl + "&r=" + (new Date()).getTime(); erxKeepAlive.open("GET", myUrl, false); erxKeepAlive.send(null); }, 5 * 60 * 1000); // five minutes } //--> </script> --- NEW FILE: ERXJSLifebeat.wod --- Link: WOActionURL { directActionName = "keepAlive"; actionClass = "ERXJSLifebeat$Action"; } --- NEW FILE: ERXJSLifebeat.woo --- {"WebObjects Release" = "WebObjects 5.0"; encoding = NSUTF8StringEncoding; } |