I found a script that would be great for what I want to do on a humane society page that I make, But... I don't know how to make an array for it to pop up an answer to a question from a text box with onclick.<br><br>The one below does exactly what I want except I need to put an array for specific questions and words.<br>example of what I am looking for:<br>If you type "I want to adopt a dog" <br>I would like it to come up "What kind of a dog are you looking for?"<br><br>Would javascript be able to do this?<br>Below is the program I found:<br><br><script type="text/Javascript"><!--<br>function filter(el) {<br> var j = 0;<br> var strHTML = " ";<br> var v_foundarray = new Array();<br> var v_array = new Array("What kind of dog?","What kind of cat?","123","324","34324","565"<br> var v_regexp = new RegExp(el.value,"gi"<br><br> for ( var i = 0; i < v_array.length; i++ ) { <br> if ( v_regexp.exec(v_array<i>) ) {<br> v_foundarray[j] = v_array<i>; // Pattern found<br> j++;<br> }<br> }<br><br> for ( var k = 0; k < v_foundarray.length; k++ ) {<br> strHTML += v_foundarray[k] + "<br>";<br> }<br><br> if (document.all) {<br> document.all.vals.innerHTML = strHTML;<br> }<br> else if (document.layers) {<br> document.layers['vals'].document.open();<br> document.layers['vals'].document.write(strHTML);<br> document.layers['vals'].document.close();<br> }<br>}<br>//--></script><br><br><form onSubmit="return false"><br><input name="test" type="text"> <input type="button" value="Filter" onClick="filter(this.form.test)"><br></form><br><br><div id="vals" style="position:absolute"><br><pre><br><br><br><br><br></pre><br></div><br><br><br><br><br>