1. We apologize for the slow support at the moment. Hugh (cheesegrits) is scheduled for some major back surgery this month to repair two ruptured discs which are severely hampering his ability to work, and one of our stalwart community support members is on vacation for the month. Please bear with us.

Small JS (syntax ?) problem

Discussion in 'Standard Support' started by jfquestiaux, Sep 3, 2010.

Thread Status:
Not open for further replies.
  1. jfquestiaux Well-Known Member

    Level: Professional
    Hi,
    I use the following code that you provided me in my template to have the message "XXX characters left" in different languages :

    <script>
    window.addEvent('load', function() {
    $$('.fabrik_characters_left')[0].innerHTML = $$('.fabrik_characters_left')[0].innerHTML.replace(/Characters left/,'caractères restants');
    });
    window.addEvent('load', function() {
    $$('.fabrik_characters_left')[1].innerHTML = $$('.fabrik_characters_left')[1].innerHTML.replace(/Characters left/,'caractères restants');
    });
    </script>

    That was working fine with 2.0.rc5 but I have now upgraded to 2.0.2 and now the message is displayed only in the default language of the site.
    I guess it is a syntax problem related to Mootools 1.2.4 but I have no clue what it could be.
    I'd appreciate if someone could correct the above code.
  2. jfquestiaux Well-Known Member

    Level: Professional
    OK, it is working again (not too sure why, but...)
  3. rob Administrator

    Level: Community
    I would blame those pesky lunar cycles!
Thread Status:
Not open for further replies.

Share This Page