0down votefavorite | I have a Radtextbox. I have implemented the maximum characters per line and limit in number of lines. But I need your help that, after the maximum character limit per line text should go to next line. For Example:
Code: function ValidationAddress() { var allText; allText = document.getElementById("<%= txtAdd1.ClientID %>").value; allText = document.getElementById('<%=txtAdd1.ClientID%>').value; var A = allText.split('\n'); var L = A.length; if (L > 3 && event.keyCode != 8 && event.keyCode != 46) { alert("You have exceeded maximum limit.Cannot insert more than 3 lines."); valert = false; return false; } var arr = allText.split("\n"); for (var i = 0; i < arr.length; i++) { if (arr[i].length > 10) { alert("You have exceeded the Maximum Limit..Characters per line is 70 in Address Field !"); valert = false; return false; } } } |
Loading
Anil MadhavarapuPosted Aug 17, 2017, 3:59 AM
Sundaram SubramanianPosted Aug 16, 2017, 8:47 AM