Home » Snippets » Browse Snippet

Browse Snippet

submitform function hack
License
Apache Software License
Programming Language
PHP
Topic
Accessibility
 

Description:

Why not change the function submitform (includes/js/joomla.javascript.js) to:

/**
* Submit the admin form
*/
function submitform(pressbutton,formName){
if (formName == null){
var formName = "adminForm";
}

if (pressbutton) {
document[formName].task.value=pressbutton;
}
if (typeof document[formName].onsubmit == "function") {
document[formName].onsubmit();
}
document[formName].submit();
}



This will give you more flexibility: I had a problem in a module because I had a form in my component too (both adminForm: error). I now can name them other than adminForm and still use this joomla framework.

Sadly it's a hack, and I'm wondering why it isn't a part of the standard code yet?

Files in this snippet:

No files for this snippet
Submitted by Bert van 't Hul on 2009-11-30 09:22:27

©2005-2018 Open Source Matters, Inc. All rights reserved. Joomla Hosting by Rochen Ltd.    Accessibility Statement    Privacy Policy    Gforge