verN Posted April 20, 2007 Share Posted April 20, 2007 echo ('<p><input id="seminarT "name="seminarT" type="text" size="60" value="'.$sem_title.'" onchange="checkInput()" /></p>'); function checkInput() { var str = document.getElementByName("seminarT").value; if ( str.Length > 10 ) { alert("Please enter less than 20 characters"); } } i am using this code but nothing gets outputted when I type in more then 20 charaters. Any hellp will be good. Thanks Quote Link to comment Share on other sites More sharing options...
fenway Posted April 23, 2007 Share Posted April 23, 2007 getElementByName? Why? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.