Pages

Showing posts with label Dropdown selection set textbox maxlength. Show all posts
Showing posts with label Dropdown selection set textbox maxlength. Show all posts

Tuesday, September 17, 2013

Based on dropdown selection dynamically set texbox maximumlength Using jquery

Here i explain how to set textbox maximumlenght depends on dropdown selection. Follow the below simples steps to get the result.

Script snippet:

 function drpchange() {
        if ($('#<%=searchtooldrp.ClientID %> :selected').text() != "Emp Name") {
            $('#<%=searchtooltxt.ClientID %>').attr("maxlength", "10");   
        }
    }

HTML snippet: