For Joomla 3.x don’t use document.id(‘xxx’)

9 Jahre 6 Monate her #444 von Dimitris
Joomla 3.x is supporting IE8 and newer. Using this legacy mootools code is useless. For example the following code:
<script type="text/javascript">
    js = jQuery.noConflict();
    js(document).ready(function() {
        
    });
    Joomla.submitbutton = function(task)
    {
        if (task == 'basic.cancel') {
            Joomla.submitform(task, document.getElementById('basic-form'));
        }
        else {
            
            if (task != 'basic.cancel' && document.formvalidator.isValid(document.id('basic-form'))) {
                
                Joomla.submitform(task, document.getElementById('basic-form'));
            }
            else {
                alert('<?php echo $this->escape(JText::_('JGLOBAL_VALIDATION_FORM_FAILED')); ?>');
            }
        }
    }
</script>
Can be: 
if (task != 'basic.cancel' && document.formvalidator.isValid(document.getElementById('basic-form'))) {
Without any compromise.

Recently I propose removing these legacy mootools methods in Joomla PR

Thanks Dimitris

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

9 Jahre 3 Monate her #582 von Dimitris
FYI Joomla 3.4 is scheduled for mid February and has those changes. Also There is a JTHML::(behavior.formvalidator); instead of the JTHML::(behavior.formvalidation); which uses only jQuery. 

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Ladezeit der Seite: 0.151 Sekunden
Powered by Kunena Forum

Wir verwenden eigene Cookies und Cookies von Drittanbietern, um Ihr Nutzererlebnis zu verbessern und Ihnen einen optimalen Service zu bieten. Wenn Sie die Website weiter nutzen, gehen wir davon aus, dass Sie mit unserer Cookie-Politik einverstanden sind.