From 4e7c11f0c925c77dcabee223a01626a5289722d6 Mon Sep 17 00:00:00 2001 From: Cedric RICARD Date: Fri, 21 Dec 2007 07:05:01 +0000 Subject: [PATCH] Fix IE double submit bug: now the generated javascript is dependent of button aspect for full backward compatibility. --- calexium_lib/web/CXM_making_a_web_site.anubis | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/calexium_lib/web/CXM_making_a_web_site.anubis b/calexium_lib/web/CXM_making_a_web_site.anubis index 86b13ba..e7f15df 100644 --- a/calexium_lib/web/CXM_making_a_web_site.anubis +++ b/calexium_lib/web/CXM_making_a_web_site.anubis @@ -2827,6 +2827,7 @@ define URL_or_JavaScript format_action ( String the_url, + Actioner_Aspect aspect, Maybe(String) mb_id, Maybe(String) mb_form_name ) = @@ -2847,8 +2848,9 @@ define URL_or_JavaScript "function ", fn_name, "() {\n", " var fa = document.forms.f",form_name,";\n", " var u = \"",the_url,"\";\n", - " fa.action = u; }\n", -// " fa.submit(); }\n", + " fa.action = u;", + if aspect is submit(_, _) then " }\n" + else "\n fa.submit(); }\n", "\n" ], [fn_name,"();"] @@ -3120,7 +3122,7 @@ define Printable_tree if cinfo is info(common_name,http_port,https_port,site_dir,secret) then with url = make_actioner_url(cinfo,connection,target, state_name,action_name,extra_ops,is_https), - with action = format_action(url, extract_id(aspect), mb_form_name), + with action = format_action(url, aspect, extract_id(aspect), mb_form_name), if aspect is { -- libgit2 0.21.4