We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Count characters and fire event

Dear support team,

I've searched everywhere and I still can't find a way to count characters in a textbox and when it reaches to 5, populate a dropdownlist.

I'm using Syncfusion Essential JS2 for ASP Core.

I would appreciate any help.

Thanks in advance.


1 Reply

BS Buvana Sathasivam Syncfusion Team May 19, 2023 04:14 PM UTC

Hi George,


We have prepared a sample based on the shared information. Please find the code snippet and sample attached for your reference.


<ejs-textbox id="txtName" maxlength="5"  Input="inputHandler"></ejs-textbox>

 

<script>

 function inputHandler(args) {

     if (args.value.length == 5) {

        // Here, you can perform your operation

     }

     }

</script>



Regards,

Buvana S


Attachment: SyncfusionCore_8b39e0c5.zip

Loader.
Up arrow icon