I'm using jqueryui autocomplete combobox in my jsp page. I need to set selected value of combo-box to the HttpSession
.
I tried as below.
this._on(this.input, {
autocompleteselect: function (event, ui) {
// alert(ui.item.value);
var value = ui.item.value;
<% session.setAttribute("comboboxvalue",value); %>
ui.item.option.selected = true;
this._trigger("select", event, {
item: ui.item.option
});
}
Problem with this way is that code don't recognize value
param.
How can I solve this and set session attribute using javascript
?