i used the above code & getting this error
Microsoft JScript runtime error: 'undefined' is null or not an object
at line
var x=$get('tx_name').value = dd.substring(0, dd.indexOf('|'));
in the below line
var dd = $find("autoCompleteBehavior1").get_completionList().childNodes[index]._value;
i get the value of dd as undefined
this is my full code
function pageLoad()
{
$find("autoCompleteBehavior1").add_itemSelected(setValue);
}
function setValue()
{
var index = $find("autoCompleteBehavior1")._selectIndex;
var dd = $find("autoCompleteBehavior1").get_completionList().childNodes[index]._value;
alert(dd)
var x=$get('tx_name').value = dd.substring(0, dd.indexOf('|'));
alert(x)
}