From 43167e00879f059f1047e9e59e2e8ec8a121897f Mon Sep 17 00:00:00 2001 From: "Matteo Nastasi (mop)" Date: Sun, 24 Dec 2006 08:54:43 +0000 Subject: [PATCH] rifattorizzata la chat (keypress event) --- web/commons.js | 28 ++++++++++++++++++++++------ web/table.php | 2 +- 2 files changed, 23 insertions(+), 7 deletions(-) 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:
-
+


-- 2.17.1