Skip to main content

How do I invoke a javascript function from dojo FishEye?

2 replies [Last post]
Joined: 2008-05-14

I have a code as follows:

I want to invoke a java script function from fish eye (on click) which sets text in the text field.
Any help would be appreciated.
Thanks in advance.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2008-05-14

Thank you so much! =)

Joined: 2005-02-10

Hi djdanjazz,

You can call a javascript function by publishing to a topic and providing a listener for that topic.

For example, just looking at one of the entries from the fisheye widget I made the following changes:

{iconSrc : 'images/logo.gif',
label : 'Zipcode',
action : {topic : '/mytopic',
message : {value : 'Item ZipCode clicked'}}

Then in glue.js or somewhere else:

jmaki.subscribe ("/mytopic", function(args){
alert("value is "+ args.message.value);

basically you are publishing to a topic that you are going to subscribe (listen) to. When the icon is clicked the message is published to the topic and any subscriber will be called.