From 31a958ddd551b1f78c523285e952e1ea4a853e17 Mon Sep 17 00:00:00 2001 From: Andrea Zagli Date: Mon, 20 Jul 2020 09:21:46 +0200 Subject: [PATCH] Start test cgi js validation. --- src/cgi.js | 16 ++++++++++++++++ src/cgi_ini_b4.c | 5 ++++- 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 src/cgi.js diff --git a/src/cgi.js b/src/cgi.js new file mode 100644 index 0000000..970dd3c --- /dev/null +++ b/src/cgi.js @@ -0,0 +1,16 @@ +function click_add () +{ + alert ("add"); + + $("#spanName").remove(); + $("#name").addClass("is-invalid"); + $("#name").parent().append("pippolo"); +} + +function click_remove () +{ + alert ("remove"); + + $("#name").removeClass("is-invalid"); + $("#spanName").remove(); +} diff --git a/src/cgi_ini_b4.c b/src/cgi_ini_b4.c index 91a8d64..ff8fd71 100644 --- a/src/cgi_ini_b4.c +++ b/src/cgi_ini_b4.c @@ -57,7 +57,9 @@ main (int argc, char *argv[]) "\n" "\n" "\n" - "
\n"); + "
\n" + "\n" + "\n"); val = zak_cgi_main_get_parameter (zakcgimain, "filename"); if (val != NULL) @@ -149,6 +151,7 @@ main (int argc, char *argv[]) "\n" "\n" "\n" + "\n" "\n" ""); -- 2.49.0