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 Link to comment https://forums.phpfreaks.com/topic/47947-solved-character-legnth/ Share on other sites More sharing options...
fenway Posted April 23, 2007 Share Posted April 23, 2007 getElementByName? Why? Link to comment https://forums.phpfreaks.com/topic/47947-solved-character-legnth/#findComment-235975 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.