diff --git a/etemplate/js/et2_extension_nextmatch_actions.js b/etemplate/js/et2_extension_nextmatch_actions.js index e742f6478c..d182f58667 100644 --- a/etemplate/js/et2_extension_nextmatch_actions.js +++ b/etemplate/js/et2_extension_nextmatch_actions.js @@ -149,7 +149,7 @@ function nm_action(_action, _senders, _target, _ids) return value; } - if(_action.data.nm_action == 'popup') + if(_action.data.nm_action == 'open_popup') { nextmatch.getInstanceManager().submit(); diff --git a/etemplate/js/etemplate2.js b/etemplate/js/etemplate2.js index 81dab7dabc..b8fd5e0e35 100644 --- a/etemplate/js/etemplate2.js +++ b/etemplate/js/etemplate2.js @@ -313,21 +313,19 @@ etemplate2.prototype.postSubmit = function() if (canSubmit) { - var form = document.createElement("form"); - form.method = "POST"; - form.action = egw().webserverUrl +"/json.php?menuaction=etemplate::ajax_process_post"; + var form = jQuery("
"); - var etemplate_id = document.createElement("input"); - etemplate_id.name = 'etemplate_exec_id'; - etemplate_id.value = this.etemplate_exec_id; - form.appendChild(etemplate_id); + var etemplate_id = jQuery(document.createElement("input")) + .attr("name",'etemplate_exec_id') + .val(this.etemplate_exec_id) + .appendTo(form); var input = document.createElement("input"); input.name = 'value'; input.value = egw().jsonEncode(values); - form.appendChild(input); + form.append(input); - form.submit(); + form.appendTo(jQuery('body')).submit(); } }