• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Struts Dojo autocompleter

 
Vishnu Naire
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ,
I am using struts -dojo plugin in my struts 2 application.I have a problem when i use the dojo autocompleter.I am not sure how I can call a javascript function using the onselect() event from the autocompleter.My idea was to get the selected value of the autocompleter into that js function.Any help would be greatly appreciated.Please forgive if there are any mistakes in the way the question has been raised as this is my first day here .

<sx:autocompleter name="" list="" id="jsauto" template="autocompleter.ftl" onselect="showKey()"/> (name and list values come from OGNL)

Js used :
function showKey() {
alert("Inside Autocompleter valiate");
var autoCompleter = dojo.widget.byId('jsauto');
alert("AutoCompleter Value"+autoCompleter.getSelectedKey());
}

Plss help

Regards,
Vishnu
 
Vishnu Naire
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This issue was resolved . I called the js event onlick() of the submit button and it worked .
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic