thumpkidd9
Programmer
Hey guys,
I had originally posted this under the HTML forum but someone suggested I try here. I was just trying to make a simple script that populates my <div> tag for each letter I type in the search text field.
This is the line that calls the search is below where this.value = the input from keyboard, searchDiv is the ID of the <div> tag and fileS.php is the file that does the searching.
The search works fine, the problem I am running into is that the onchange event doesn't happen until I hit enter on the search text field (with <textarea> if I lose focus of the textarea box by clicking off it, it will get my results as well).
I was curious if there was just no way to have the <input type=text> box update per keychange and not when hitting enter. I have tried the following to no avail (onkeyup, onkeydown, onkeypress).
Any help would be great.
Thanks !
I had originally posted this under the HTML forum but someone suggested I try here. I was just trying to make a simple script that populates my <div> tag for each letter I type in the search text field.
This is the line that calls the search is below where this.value = the input from keyboard, searchDiv is the ID of the <div> tag and fileS.php is the file that does the searching.
Code:
<input type="text size="10" name="search" onchange="grabData(this.value,'searchDiv','fileS.php')" />
The search works fine, the problem I am running into is that the onchange event doesn't happen until I hit enter on the search text field (with <textarea> if I lose focus of the textarea box by clicking off it, it will get my results as well).
I was curious if there was just no way to have the <input type=text> box update per keychange and not when hitting enter. I have tried the following to no avail (onkeyup, onkeydown, onkeypress).
Any help would be great.
Thanks !