preferences_update();
sess = "<?php echo "$sess"; ?>";
- hstm = new http_streaming(gst, 'table_php', 'sess', $('sandbox'), 'index_rd.php');
+ hstm = new http_streaming(gst, 'table_php', 'sess', $('sandbox'), 'index_rd.php', function(com){eval(com);});
hstm.hbit_set(heartbit);
window.onbeforeunload = onbeforeunload_cb;
* NOT MANDATORY
* - type of streaming into the constructor
* - all iframe related streaming add
- * - substitute fixed "eval" with a generic command hunks processor
*
+ * DONE - substitute fixed "eval" with a generic command hunks processor
* DONE - myfrom (now from) into the constructor
* DONE - target page into the constructor
* DONE - gst management
*
*/
-function http_streaming(gst, from, cookiename, sandbox, targetpage)
+function http_streaming(gst, from, cookiename, sandbox, targetpage, cmdproc)
{
this.xhr = createXMLHttpRequest();
// this.xhr.setRequestHeader("Content-type", "text/html; charset=utf-8");
this.cookiename = cookiename;
this.sandbox = sandbox;
this.targetpage = targetpage;
+ this.cmdproc = cmdproc;
}
http_streaming.prototype = {
cookiename: null,
sandbox: null,
targetpage: null,
+ cmdproc: null,
/* cookiepath is automatically customized in installation phase */
cookiepath: "/brisk/",
// $("xhrdeltalog").innerHTML = "EVALL: "+singlecomm.replace("<", "<", "g"); +"<br>";
this.hbit("+");
- eval(singlecomm);
+ this.cmdproc(singlecomm);
again = 1;
}
else {
?>
sess = "<?php echo "$sess"; ?>";
- hstm = new http_streaming(gst, 'index_php', 'sess', $('sandbox'), 'index_rd.php');
+ hstm = new http_streaming(gst, 'index_php', 'sess', $('sandbox'), 'index_rd.php', function(com){eval(com);});
hstm.hbit_set(heartbit);
tra = new train($('room_tit'));
window.onunload = onunload_cb;