View Single Post
  #17 (permalink)  
Old 10-19-2007, 05:09 AM
Pvinothkumar Pvinothkumar is offline
D-Web Analyst
 
Join Date: Sep 2007
Posts: 237
Pvinothkumar is on a distinguished road
Default How can I constantly check to see if and when the user has entered a specific word

Hi all...


How can I constantly check to see if and when the user has entered a specific word in a text box?


<FORM NAME="myForm">
<INPUT TYPE="TEXT" NAME="myText">
</FORM>

<SCRIPT LANGUAGE="JavaScript"><!--
function monitorText() {
if (document.myForm.myText.value.indexOf('skip') > -1)
alert('detected skip');
else
setTimer('monitorText()',1000); // checks field every 1000 milliseconds
}

monitorText();
//--></SCRIPT>


Thanks...
Reply With Quote