Hi,I want to store auto complete values in array to store in DB. Any suggestions
function lookup(inputString) {
if(inputString.length == 0) {
// Hide the suggestion box.
$('#suggestions').hide();
} else {
$.post("rpc.php", {queryString: ""+inputString+""}, function(data){
if(data.length >0) {
$('#suggestions').show();
$('#autoSuggestionsList').html(data);
}
});
}
} // lookup
function fill(thisValue) {
if($('textarea#inputString1').val() == ''){
<!-- $("textarea[inputString1]").prependTo("#foo"); -->
$('#inputString').val(thisValue);
$('#inputString1').val(thisValue);
}else{
$('textarea#inputString1').val(thisValue)=$('textarea#inputString1').val()+','+$('#inputString').val();
}
setTimeout("$('#suggestions').hide();", 200);
}
Type your county:
<div class="suggestionsBox" id="suggestions" style="display: none;">
<img src="upArrow.png" style="position: relative; top: -12px; left: 30px;" alt="upArrow" />
<div class="suggestionList" id="autoSuggestionsList">
</div>
</div>
<textarea type="text" size="30" value="" id="inputString1" /></textarea>