1. Hugh is now back at work, more or less full time, after a slower than expected recovery from his neck surgery early this month. Obviously we have a backlog of support to clear, and are working as hard as we can to take care of it. If you have an unanswered thread more than 3 days old, please post one (and only one) "bump" on it, to move it in to our "last 3 days" list. If you have an unanswered issue in a forum you no longer have access to due to subscriptions timing out, please use the Contact Us form, and provide us with the URL to the thread.

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