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

9 года 6 мес. назад #444 от Dimitris
Dimitris создал тему: For Joomla 3.x don’t use document.id(‘xxx’)
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

Пожалуйста Войти или Регистрация, чтобы присоединиться к беседе.

9 года 4 мес. назад #582 от Dimitris
Dimitris ответил в теме For Joomla 3.x don’t use document.id(‘xxx’)
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. 

Пожалуйста Войти или Регистрация, чтобы присоединиться к беседе.

Время создания страницы: 0.124 секунд
Работает на Kunena форум

We use cookies so that you can place orders and we can provide a better service. You can control the use of cookies at the individual browser level. If you reject cookies, you may still use our website, but your ability to use some features or areas of our website may be limited.