Skip to main content

JMaki Yahoo Dialog Question

3 replies [Last post]
grayside
Offline
Joined: 2009-03-09

Im very new to JMaki... So I apologize should my question would sound silly and simple, but here it goes:

I would just like to ask if this scenario is possible:
I have a Yahoo Dialog that have 2 Buttons (Yes and No). I would like to redirect the user to a page, depending on what button the user picked.

Thank you very much...

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
grayside
Offline
Joined: 2009-03-09

You can get the button selected in the dialog using this code in Glue.js:

jmaki.subscribe("/yahoo/simpledlg/onClick", function(args){
lert(args.value.label);
}

gmurray71
Offline
Joined: 2003-07-31

You can try this to find out what properties come with the args:

jmaki.subscribe("/yahoo/simpledlg/onClick", function(args){
jmaki.debug=true;
jmaki.log(jmaki.inspect(args));
}

My suspicion is that there should be a args.widgetId which you can use to find the button.

To get a reference to the widget you can do something like:

var button =jmaki.getWidget(args.widgetId);

grayside
Offline
Joined: 2009-03-09

Is there anyway I could get the button selected in args?