Skip to main content

yahoo dialog button

1 reply [Last post]
wkharrat
Offline
Joined: 2008-11-19
Points: 0

Hi,
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>});</p>
<p>function afficheAlert() {<br />
    var a = jmaki.getWidget('form1:dialogYahoo');<br />
    a.setVisible(true);</p>
<p>}

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

Thanks in advance

Walid

Reply viewing options

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

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.

-Greg