aspose file tools*
The moose likes Struts and the fly likes Calling a java-script function when the value of a Dojo auto-completer changes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Calling a java-script function when the value of a Dojo auto-completer changes" Watch "Calling a java-script function when the value of a Dojo auto-completer changes" New topic
Author

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

kanishk dewan
Greenhorn

Joined: Aug 11, 2011
Posts: 9
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!!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Calling a java-script function when the value of a Dojo auto-completer changes