views:

28

answers:

1

JQueryUI has a very nice Dialog, but I wonder how I could create a similar dialog with multiple values I can select from.

It does not necessarily need to have a text area. Similar to how the right-click window looks or how the selection dialogs work on Android.

+1  A: 

I'm not sure exactly what you are trying to do here, but I think you mean that you have various different options from which you want you want your user to select one. You can do this by creating multiple buttons using the buttons option:

$(selector).dialog({
    buttons: {
        'button 1': function() {
            // handle if button 1 is clicked
        },
        'button 2': function() {
            // handle if button 2 is clicked
        },
        'button 3': function() {
            // handle if button 3 is clicked
        }
    }
});

If this isn't what you need, perhaps you could provide a more detailed explanation of what you want to achieve.

lonesomeday
Not exactly as I wanted but very nice. If you happen to know how to tell the buttons to be one under the other, that would be even more awesome.
szabgab