X-Git-Url: http://mop.ddnsfree.com/gitweb/?a=blobdiff_plain;f=web%2Fcommons.js;h=e305e990d76639a0804919611a9d25b6b28eb5bb;hb=a3a94bbfaa5b0484a6d32bb04bde148f5f95347b;hp=bbeccf1011eee803056f66a8c0d571c47e497edb;hpb=bcc40499f2bd23bb41607a915ac4a72ef9d6c595;p=brisk.git diff --git a/web/commons.js b/web/commons.js index bbeccf1..e305e99 100644 --- a/web/commons.js +++ b/web/commons.js @@ -140,10 +140,14 @@ function removeEvent(obj,type,fn) function show_bigpict(obj, act, x, y) { - var big; + var big, sfx; - // alert("offsetTop: "+obj.offsetTop+" offsetLeft: "+obj.offsetLeft+"obj.id: "+obj.id); - big = $(obj.id+"_big"); + if (arguments.length > 4) + sfx = arguments[4]; + else + sfx = ''; + + big = $(obj.id+"_big"+sfx); if (act == "over") { big.style.left = obj.offsetLeft + x+"px"; big.style.top = obj.offsetTop + y+"px"; @@ -222,12 +226,17 @@ function createXMLHttpRequest() { function send_mesg(mesg) { var xhr_wr = createXMLHttpRequest(); - + var is_conn = (sess == "not_connected" ? false : true); - xhr_wr.open('GET', 'index_wr.php?sess='+sess+'&mesg='+mesg, true); + xhr_wr.open('GET', 'index_wr.php?'+(is_conn ? 'sess='+sess+'&' : '')+'mesg='+mesg, (is_conn ? true : false)); xhr_wr.onreadystatechange = function() { return; }; xhr_wr.send(null); + if (!is_conn) { + if (xhr_wr.responseText != null) { + eval(xhr_wr.responseText); + } + } } /* Stat: CHAT and TABLE */