Quantcast
Channel: OutSystems Community
Viewing all articles
Browse latest Browse all 1476385

[Forums] CharacterCount results in js error shown as feedback

$
0
0
I have solved this by creating my own version of CharacterCount control. I just took source from SilkUI and simplified it. Logically, the only difference seems to be in that original version contained this call in event binding function:

osAjaxBackend.BindAfterAjaxRequest(bindEvents);
I don't know what's inside of that, but it is probably what caused problems.

My script is much shorter than original version (I mean textCounter() function in control's javascript), here it is:

functionCharacterCount_init(inputSelector, counterSelector, limit) {varCharacterCount_update=function() {
        $(counterSelector).html(limit- $(inputSelector).val().length);
    }CharacterCount_update();
    $(inputSelector).keyup(CharacterCount_update);
}
I don't know, maybe I'm missing some understanding, if other things around in original script were important, but I have tested and my version works good, and without error.

Viewing all articles
Browse latest Browse all 1476385

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>