using jquery autocomplete, we get hidden value by calling .result function like this
$("#suggest").result(function(event, data, formatted) {
$('#hidden').val(data[1]);
});
This is only useful when we selected the option from autosuggest list and press enter. What i need is that i enter the option by typing the complete word without selecting it and clicking on Ok button? but i am always getting empty.
<input type="text" id="suggest" />
<input type="button" value="Ok" onclick="GetValue()" />
<input type="hidden" id="hidden"/>
function GetValue()
{
//get hidden field value - getting empty
var hid=document.getElementById('hidden').value;
}