From 9b839bf6f782cb5093e1cffb3c6f57277dde22cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Chapeaux?= Date: Tue, 11 Sep 2001 09:27:47 +0000 Subject: [PATCH] limit the number of characters displayed in the confirmation box --- libraries/functions.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libraries/functions.js b/libraries/functions.js index 57793b7aa..4e6d87b26 100644 --- a/libraries/functions.js +++ b/libraries/functions.js @@ -71,7 +71,10 @@ function confirmQuery(theForm1, sqlQuery1) if (do_confirm_re_0.test(sqlQuery1.value) || do_confirm_re_1.test(sqlQuery1.value) || do_confirm_re_2.test(sqlQuery1.value)) { - var is_confirmed = confirm(confirmMsg + ' :\n' + sqlQuery1.value); + var message = (sqlQuery1.value.length > 100) + ? sqlQuery1.value.substr(0, 100) + '\n ...' + : sqlQuery1.value; + var is_confirmed = confirm(confirmMsg + ' :\n' + message); // drop/delete/alter statement is confirmed -> update the // "is_js_confirmed" form field so the confirm test won't be // run on the server side and allows to submit the form