• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Tim Cooke
  • Junilu Lacar
  • Rob Spoor
  • Devaka Cooray
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Tim Holloway
  • Jj Roberts
  • Al Hobbs
  • Piet Souris

struts tag autocompleter with onclick, not working

Ranch Hand
Posts: 362
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi guys

Just wondering if someone could point me quickly into the right direction as to why strut-tags autocompleter onclick is not working?

This is a snippet of my page:

But the onchange="viewCompanies();" doesn't execute the JS function. Change the autocompleter to use a standard <s:textfield> and it works fine, the problem there is it would
require the user to know the exact name of the parent company which isn't very pratical. Looksing at the API (http://code.google.com/p/struts2-jquery/wiki/AutocompleterTag > onchange) it exists, but doesn't seem to work.

Cheers in advance
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I worked on this problem in my project for an entire day....and right when I was about to leave for home, I finally found the solution. So thought of posting it in order to help.
To solve the onchange or onselect problem, sj:sutocompleter provides "Topics" to handle such events. So following is the right way to do it:

If you also want onselect event to work then also add:

I hope it solves the proble. Cause I simply Love this Struts2-jQuery-Plugin.
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
    Bookmark Topic Watch Topic
  • New Topic