I have a very basic confirmation dialog that have 2 buttons:"Ok" & "Cancel". Here is the demo :http://jsfiddle.net/VQmAm/11/
Now I need to add to that confirmation dialog: some radio buttons and the user would select only one of these values and I would take that value to use it later.
I have found set of ways to do that other than JQuery, but I was wondering if I can do that via JQuery!
Add the radio buttons (with same name attribute) to the #confirmDialog div.
Then, you can get the selected value with the OK button:
'OK': function() {
value = $(this).find('input:checked').val();
$(this).remove();
},
Note that you get the value before removing the dialog. And you should define the var value outside the function.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With