The alert should appear when the text is longer then the maximum characters for the choosen width.
E.g.: choosen width is 15 cm, the max is 15 characters.
Prototype
Nearly ...
But in stead of ???, I need the value of "var maxChars".
Code:<script> <!-- function checkchars(cur){ var e = document.getElementById("FrogStyling_1_Size_Add"); var maxChars = e.options[e.selectedIndex].value; var maxlength=maxChars if (cur.AddText.value.length>maxlength){ alert("Please restrain your input to ??? or less characters !") return false } } //--> </script>
Yam.



Reply With Quote


Bookmarks