- labels: --> Component
- priority: 5 --> 3
- assigned_to: nobody --> ttm
I can not stop the Submit of a page/form with the Javascript OnSubmit (return false).
I have detected the problem (_clickwrapper) with in MainMenu and ToolBar (other not tested).
This Changes can implement an optional submit, depending on the OnSubmit return value. Performs Submit only if OnSubmit returned true or undefined.
My Changes:
comctrls.inc.php:
-----------------
Line 5297 insert: echo " var ret=true;\n";
Line 5302 edit: echo " if (($form.onsubmit) && (typeof($form.onsubmit) == 'function')) {ret = $form.onsubmit(); }\n";
Line 5303 edit: echo " if (ret == true || ret == undefined) { $form.submit(); }\n";
menus.inc.php:
--------------
Line 86 insert: echo " var ret=true;\n";
Line 91 edit: echo " if (($form.onsubmit) && (typeof($form.onsubmit) == 'function')) {ret = $form.onsubmit(); }\n";
Line 92 edit: echo " if (ret == true || ret == undefined) { $form.submit(); }\n";
Or is there a simple solution to the problem ?