From: Matteo Nastasi (mop) Date: Sun, 24 Dec 2006 08:54:43 +0000 (+0000) Subject: rifattorizzata la chat (keypress event) X-Git-Tag: 3.0.0~414 X-Git-Url: http://mop.ddnsfree.com/gitweb/?a=commitdiff_plain;h=43167e00879f059f1047e9e59e2e8ec8a121897f;p=brisk.git rifattorizzata la chat (keypress event) --- diff --git a/web/commons.js b/web/commons.js index 6c6fc79..2140281 100644 --- a/web/commons.js +++ b/web/commons.js @@ -137,17 +137,33 @@ function send_mesg(mesg) /* Stat: CHAT and TABLE */ -function act_chatt() +function chatt_checksend(obj,e) { - var obj = $("txt_in"); - if (obj.value == "") - return (false); - send_mesg("chatt|"+encodeURIComponent(obj.value)); + var keynum; + var keychar; + var numcheck; + + if(window.event) { // IE + keynum = e.keyCode; + } + else if(e.which) { // Netscape/Firefox/Opera + keynum = e.which; + } + // alert("OBJ: "+obj); + if (keynum == 13 && obj.value != "") { // Enter + act_chatt(obj.value); + obj.value = ""; + } +} +function act_chatt(value) +{ + send_mesg("chatt|"+encodeURIComponent(value)); + /* obj.disabled = true; obj.value = ""; obj.disabled = false; obj.focus(); - + */ return false; } diff --git a/web/table.php b/web/table.php index c70f783..8a43630 100644 --- a/web/table.php +++ b/web/table.php @@ -196,7 +196,7 @@ Hai vinto l'asta.
Scegli il seme:
-
+