Skip to main content

yahoo dialog button

1 reply [Last post]
Joined: 2008-11-19

i want use yahoo dialog with visual web pack, i add the widget, it work fine, i add this in glue.js

<br />
jmaki.subscribe("/yahoo/simpledlg/onClick", function(args) {<br />
    var widgetId = args.widgetId;</p>
<p>function afficheAlert() {<br />
    var a = jmaki.getWidget('form1:dialogYahoo');<br />

in the first js function i want know if user press yes or no.

Thanks in advance


Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2003-07-31

Hi Walid,

There are two solutions you could use:

1) Use known widgetIds with the buttons and take action based on the widget ID in question

2) Use jMaki Actions on the individual buttons to publish to different topics / or publish a different parameter.

Example On your button:

value="{ label : 'Yes', action : { topic : '/yahoo/simpledlg/onClick', message : { selected : true}} }"

value="{ label : 'No', action : { topic : '/yahoo/simpledlg/onClick', message : { selected : false}} }"

Let me know if this doesn't help.