How can i limit the number of characters entered in textbox for div elements in html

Last Reply 14 days ago By dharmendr

Posted 15 days ago

Below is my html code where user can see a drop down and on selecting the drop down we will get check box with textbox beside the checkbox.Now i need to limit the no of characters in textbox how can i do this

<tr>
        <td align="left" style="padding-left: 50px;" class="space">
            User names :
        </td>
        <td align="left" class="space">
            <div id="dropdownnames" class="dropdowncls" style="width:450px;"></div>
        </td>
    </tr>

Javascript code for check box with textbox

if ($("#dropdownnames").val() != null && $("#dropdownnames").val() != "")
                AccordianFields += AccordianFields == "" ? $("#dropdownnames").val() : "," + $("#dropdownnames").val();

            $("#dropdownnameschk").find('input[type=checkbox]:checked').each(function () {
                AccordianText = AccordianText + $(this).next("#dropdownnameschk").next("#dropdownnamestxt").val() + "~|~";
            });

 

You are viewing reply posted by: dharmendr 14 days ago.
Posted 14 days ago

Hi kavithav,

Will you please share your complete code with html.

How you are implementing checkbox with TextBox ?