Código PHP:
<script type="text/javascript" src="jquery-1.2.1.pack.js"></script>
<script type="text/javascript">
function lookup(inputString) {
if(inputString.length == 0) {
// Hide the suggestion box.
$('#suggestions').hide();
} else {
$.post("habilidades.php", {queryString: ""+inputString+""}, function(data){
if(data.length >0) {
$('#suggestions').show();
$('#autoSuggestionsList').html(data);
}
});
}
} // lookup
function fill(thisValue) {
$('#inputString').val(thisValue);
setTimeout("$('#suggestions').hide();", 200);
}
function lookup2(inputString2) {
if(inputString2.length == 0) {
// Hide the suggestion box.
$('#suggestions2').hide();
} else {
$.post("necesidades.php", {queryString: ""+inputString2+""}, function(data){
if(data.length >0) {
$('#suggestions2').show();
$('#autoSuggestionsList2').html(data);
}
});
}
} // lookup
function fill2(thisValue2) {
$('#inputString2').val(thisValue2);
setTimeout("$('#suggestions2').hide();", 200);
}
</script>
<body>
<div>
<form>
<div>
Habilidades:
<input type="text" size="30" value="" id="inputString" onkeyup="lookup(this.value);" onblur="fill();" />
</div>
<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>
<div>
Necesidades:
<input type="text" size="30" value="" id="inputString2" onkeyup="lookup2(this.value);" onblur="fill2();" />
</div>
<div class="suggestionsBox" id="suggestions2" style="display: none;">
<img src="upArrow.png" style="position: relative; top: -12px; left: 30px;" alt="upArrow" />
<div class="suggestionList" id="autoSuggestionsList2">
</div>
</div>
</form>
</div>
</body>