// transport instantiation
if (this.transp_type == "xhr") {
+ this.page = url_append_args(this.page, "transp", "xhr");
this.transp = new transport_xhr(this.doc, this, this.page);
}
else if (this.transp_type == "iframe") {
+ this.page = url_append_args(this.page, "transp", "iframe");
this.transp = new transport_iframe(this.doc, this, this.page);
}
else if (this.transp_type == "htmlfile") {
+ this.page = url_append_args(this.page, "transp", "htmlfile");
this.transp = new transport_htmlfile(this.doc, this, this.page);
}
else
<?php
+$transs = array( "iframe", "xhr", "htmlfile" );
+if (!isset($f_trans))
+ $f_trans = $transs[0];
+
+if (!isset($f_test))
+ $f_test = 1;
+
+
function mop_flush()
{
for ($i = 0; $i < ob_get_level(); $i++)
require_once("Obj/transports.phh");
- // TODO: what stream ?
- // iframe, htmlfile, xhr
-
- // $transp = new Transport_iframe();
- $transp = new Transport_xhr();
-
+ if (isset($transp) && $transp == "xhr") {
+ $transp = new Transport_xhr();
+ }
+ else if (isset($transp) && $transp == "htmlfile") {
+ $transp = new Transport_htmlfile();
+ }
+ else {
+ $transp = new Transport_iframe();
+ }
$header_out = array();
$init_string = "";
print($body);
mop_flush();
- for ($i = 1 ; $i < 20 ; $i++) {
+ for ($i = 1 ; $i < 10 ; $i++) {
$chunk = $transp->chunk($i, sprintf("\$('container').innerHTML = '%d';", $i));
print($chunk);
mop_flush();
<script type="text/javascript" src="commons.js"></script>
<!-- <script type="text/javascript" src="myconsole.js"></script> -->
-<!--
-<script type="text/javascript" src="menu.js"></script>
-<script type="text/javascript" src="ticker.js"></script>
-<script type="text/javascript" src="heartbit.js"></script>
-<script type="text/javascript" src="room.js"></script>
-<script type="text/javascript" src="preload_img.js"></script>
-<script type="text/javascript" src="AC_OETags.js"></script>
-<script type="text/javascript" src="probrowser.js"></script>
--->
-<SCRIPT type="text/javascript"><!--
+
+<script type="text/javascript"><!--
var sess = "for_test";
var stat = "";
var subst = "";
var gst = new globst();
window.onload = function() {
- xstm = new xynt_streaming(window, "xhr", null /* console */, gst, 'xynt_test01_php', 'sess', sess, null, 'xynt_test01.php?isstream=true', function(com){eval(com);});
+ xstm = new xynt_streaming(window, "<?php echo "$f_trans";?>", null /* console */, gst, 'xynt_test01_php', 'sess', sess, null, 'xynt_test01.php?isstream=true', function(com){eval(com);});
/* xstm.hbit_set(heartbit); */
xstm.start();
}
//-->
-</SCRIPT>
+</script>
</head>
-<!-- if myconsole <body onunload="deconsole();"> -->
<body>
+<div>
+<?php
+
+printf("<table>");
+for ($test = 1 ; $test <= 2 ; $test++) {
+ printf("<tr>");
+ foreach ($transs as $trans) {
+ printf("<td style=\"padding: 8px; border: 1px solid black;\"><a href=\"?f_trans=%s&f_test=%d\">Test %s %02d</a></td>", $trans, $test, $trans, $test);
+ }
+ printf("</tr>\n");
+}
+printf("</table>");
+printf("<br>[%s]<br>Test: %d<br>", $f_trans, $f_test);
+?>
+</div>
<div id="container">
BEGIN
</div>