• Post Reply Bookmark Topic Watch Topic
  • New Topic

Calling a java-script function when the value of a Dojo auto-completer changes

 
kanishk dewan
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am trying to have a java-script function executed when the value of a Dojo auto-completer is changed by the user.

But when I use the usual onChange event handler in the dojo auto-completer for executing java-scripts, it has no effect i.e. the java scripts are not called.

I have used the java scripts to do the following 2 things :

1) Call a struts 2 action (by notifying a topic and then listening it elsewhere).

2) Change the value of a hidden field (to pass on some data to the action).

Although for notifying a topic there is another way :
using attribute --> valueNotifyTopic="topicName".
This will publish the topic and I can listen it elsewhere to call an action.
But this method does not allow me to change the value of the hidden field I mentioned.

This is the code:

Here the onchange attribute seems to have no effect.

Please advice.
Thanks!!
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!