Name: Anonymous 2009-04-30 21:25
So I have this script I found for autocomplete forms that runs off of a sql query on keyup. The problem I'm facing is sending the clicked item to the field you type in
function fill(thisValue) {
$('#inputIdHere').val(thisValue);
setTimeout("$('#suggestions').hide();", 200);
}
<input type="text" size="30" value="" id="inputIdHere" onkeyup="lookup(this.value, 'query.php');" onblur="fill();" />
mind you this isn't all of it but should be the section causing the problem. I want to either find the id currently 'inputIdHere' or I want to type it as a variable in fill();
but when I type it in fill i break thisValue as far as i can tell
halp?
function fill(thisValue) {
$('#inputIdHere').val(thisValue);
setTimeout("$('#suggestions').hide();", 200);
}
<input type="text" size="30" value="" id="inputIdHere" onkeyup="lookup(this.value, 'query.php');" onblur="fill();" />
mind you this isn't all of it but should be the section causing the problem. I want to either find the id currently 'inputIdHere' or I want to type it as a variable in fill();
but when I type it in fill i break thisValue as far as i can tell
halp?