Created
July 3, 2014 16:19
-
-
Save khangvm53/cd3ef423f3428641079c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Joomla.submitform = function(task, form) { | |
if (typeof (form) === 'undefined' || form === null) { | |
form = document.adminForm; | |
} | |
jQuery('.toolbox-saveConfig').trigger('click'); // dirty hack for megamenu save | |
if (typeof (task) !== 'undefined') { | |
form.task.value = task; | |
} | |
// Submit the form. | |
if (typeof form.onsubmit == 'function') { | |
form.onsubmit(); | |
} | |
if (typeof form.fireEvent == "function") { | |
form.fireEvent('submit'); | |
} | |
////build your data to save in here | |
form.submit(); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment