[Phpfreechat-svn] SF.net SVN: phpfreechat: [1077] branches/pfc-comet/misc/comet-tests/iframe2 /test
Status: Beta
Brought to you by:
kerphi
From: <ke...@us...> - 2007-08-02 16:53:00
|
Revision: 1077 http://phpfreechat.svn.sourceforge.net/phpfreechat/?rev=1077&view=rev Author: kerphi Date: 2007-08-02 09:52:42 -0700 (Thu, 02 Aug 2007) Log Message: ----------- add a test with infinite loop Added Paths: ----------- branches/pfc-comet/misc/comet-tests/iframe2/tester-loop.php Added: branches/pfc-comet/misc/comet-tests/iframe2/tester-loop.php =================================================================== --- branches/pfc-comet/misc/comet-tests/iframe2/tester-loop.php (rev 0) +++ branches/pfc-comet/misc/comet-tests/iframe2/tester-loop.php 2007-08-02 16:52:42 UTC (rev 1077) @@ -0,0 +1,39 @@ +<?php + +function macallback($pfccomet) { + return $pfccomet->formatResponse(time()); +} + +require_once 'pfccomet.class.php'; +$pfccomet = new pfcComet(); +$pfccomet->pfccometjs_url = './pfccomet.js'; +$pfccomet->prototypejs_url = '../../../data/public/js/prototype.js'; +$pfccomet->backend_loop = true; +$pfccomet->backend_url = './tester-loop.php'; +$pfccomet->backend_callback = 'macallback'; +$pfccomet->onresponse_callback = 'update_servertime_area'; +$pfccomet->run(); + +?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <title>pfcComet tester</title> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + +<script type="text/javascript"> +function update_servertime_area(comet,time) +{ + document.getElementById('date').innerHTML = time; +} +</script> + +<?php $pfccomet->printJavascript(); ?> + + + </head> + <body> + + <div id="date">here will be displayed the server time</div> + + </body> +</html> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |