Restricting the input field value with maxlength specified using the below javascript here, function textLimit(field, maxlen) { if (field.value.length > maxlen + 1) alert(’your input has been truncated!’); if (field.value.length > maxlen) field.value = field.value.substring(0, maxlen); } This function is called on the input text onkeyup events, like below <INPUT TYPE=”text” NAME=”dd” onkeyup=”textLimit(dd,10)”>
Posts Tagged ‘maxlength’
July 1st, 2009
SQL Injection Attack
What is SQL injection? It is a basically a trick to inject SQL command or query as a input mainly in the form of the POST or GET method in the web pages. Most of the websites takes parameter from the form and make SQL query to the database. For a example, in a product [...]



Posted in
Tags: