1. The forums have been upgraded to XenForo 1.4. Please post any issues or comments here.
  2. Our hosting provider will be performing some scheduled maintenance and upgrading during the early morning (US time) of Tue 28th July, starting at approx 2am EST, which will require some down time of the server.

Small JS (syntax ?) problem

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

Thread Status:
Not open for further replies.
  1. jfquestiaux

    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

    jfquestiaux Well-Known Member

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

    rob Administrator Staff Member

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

Share This Page