From 5e014cdfe2a3020bb47cc22454fb40034f51fe20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20St=C3=B6ckel?= Date: Sun, 17 Apr 2011 16:53:24 +0000 Subject: [PATCH] Fixed problem with commiting forms in Firefox --- etemplate/js/nextmatch_action.js | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/etemplate/js/nextmatch_action.js b/etemplate/js/nextmatch_action.js index c7db06fe62..be1b67b015 100644 --- a/etemplate/js/nextmatch_action.js +++ b/etemplate/js/nextmatch_action.js @@ -114,8 +114,12 @@ function nm_action(_action, _senders) { url = _action.data.url.replace(/(\$|%24)id/,ids); } - var target; - if (typeof _action.data.target != 'undefined') target = _action.data.target; + + var target = null; + if (typeof _action.data.target != 'undefined') + { + target = _action.data.target; + } switch(_action.data.nm_action) { @@ -132,15 +136,17 @@ function nm_action(_action, _senders) break; case 'submit': + var form = document.getElementsByName("eTemplate")[0]; + document.getElementById('exec[nm][action]').value = _action.id; document.getElementById('exec[nm][selected]').value = ids; if (typeof _action.data.button != 'undefined') { - submitit(eTemplate,'exec[nm][rows]['+_action.data.button+']['+ids+']'); + submitit(form.context, 'exec[nm][rows]['+_action.data.button+']['+ids+']'); } else { - eTemplate.submit(); + form.submit(); } break; }