Fixed problem with commiting forms in Firefox

This commit is contained in:
Andreas Stöckel 2011-04-17 16:53:24 +00:00
parent cb9355ac00
commit 5e014cdfe2

View File

@ -114,8 +114,12 @@ function nm_action(_action, _senders)
{ {
url = _action.data.url.replace(/(\$|%24)id/,ids); 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) switch(_action.data.nm_action)
{ {
@ -132,15 +136,17 @@ function nm_action(_action, _senders)
break; break;
case 'submit': case 'submit':
var form = document.getElementsByName("eTemplate")[0];
document.getElementById('exec[nm][action]').value = _action.id; document.getElementById('exec[nm][action]').value = _action.id;
document.getElementById('exec[nm][selected]').value = ids; document.getElementById('exec[nm][selected]').value = ids;
if (typeof _action.data.button != 'undefined') 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 else
{ {
eTemplate.submit(); form.submit();
} }
break; break;
} }