Index: lams_tool_gmap/web/WEB-INF/tags/AuthoringButton.tag =================================================================== diff -u -r58fa6104ffbda5048640425d373ebecb6b479029 -r07816ee123b4d33a4ecfcbc266e6791417e699ae --- lams_tool_gmap/web/WEB-INF/tags/AuthoringButton.tag (.../AuthoringButton.tag) (revision 58fa6104ffbda5048640425d373ebecb6b479029) +++ lams_tool_gmap/web/WEB-INF/tags/AuthoringButton.tag (.../AuthoringButton.tag) (revision 07816ee123b4d33a4ecfcbc266e6791417e699ae) @@ -83,10 +83,10 @@ } } function doSubmit_Form_Only() { - var save = serialiseMarkers(); - if (save) { - saveMapState(); - document.getElementById("${formID}").submit(); + var form = document.getElementById("${formID}"); + //invoke onsubmit event if it's available, submit form afterwards + if (form.onsubmit == null || (form.onsubmit != null) && form.onsubmit()) { + form.submit(); } } function doCancel() { Index: lams_tool_gmap/web/pages/authoring/authoring.jsp =================================================================== diff -u -r97ded6a90b089fe5e01c48c02f952e8b09d5a911 -r07816ee123b4d33a4ecfcbc266e6791417e699ae --- lams_tool_gmap/web/pages/authoring/authoring.jsp (.../authoring.jsp) (revision 97ded6a90b089fe5e01c48c02f952e8b09d5a911) +++ lams_tool_gmap/web/pages/authoring/authoring.jsp (.../authoring.jsp) (revision 07816ee123b4d33a4ecfcbc266e6791417e699ae) @@ -2,9 +2,21 @@ <%@ page import="org.lamsfoundation.lams.tool.gmap.util.GmapConstants"%> + + + Index: lams_tool_spreadsheet/web/WEB-INF/tags/AuthoringButton.tag =================================================================== diff -u -r712bca538befc7e82127e4807351b30df3fb297d -r07816ee123b4d33a4ecfcbc266e6791417e699ae --- lams_tool_spreadsheet/web/WEB-INF/tags/AuthoringButton.tag (.../AuthoringButton.tag) (revision 712bca538befc7e82127e4807351b30df3fb297d) +++ lams_tool_spreadsheet/web/WEB-INF/tags/AuthoringButton.tag (.../AuthoringButton.tag) (revision 07816ee123b4d33a4ecfcbc266e6791417e699ae) @@ -83,9 +83,11 @@ } } function doSubmit_Form_Only() { - var code = window.frames["externalSpreadsheet"].cellsToJS(); - document.getElementById("spreadsheet.code").value = code; - document.getElementById("${formID}").submit(); + var form = document.getElementById("${formID}"); + //invoke onsubmit event if it's available, submit form afterwards + if (form.onsubmit == null || (form.onsubmit != null) && form.onsubmit()) { + form.submit(); + } } function doCancel() { if(confirm("")){ Index: lams_tool_spreadsheet/web/pages/authoring/authoring.jsp =================================================================== diff -u -r8179037dc958585c054547eb7de9be14c6aed233 -r07816ee123b4d33a4ecfcbc266e6791417e699ae --- lams_tool_spreadsheet/web/pages/authoring/authoring.jsp (.../authoring.jsp) (revision 8179037dc958585c054547eb7de9be14c6aed233) +++ lams_tool_spreadsheet/web/pages/authoring/authoring.jsp (.../authoring.jsp) (revision 07816ee123b4d33a4ecfcbc266e6791417e699ae) @@ -40,6 +40,12 @@ myForm.submit(); } + function onSubmitHandler() { + var code = window.frames["externalSpreadsheet"].cellsToJS(); + document.getElementById("spreadsheet.code").value = code; + return true; + } + @@ -62,7 +68,7 @@ <%@ include file="/common/messages.jsp"%> - +