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
nameattribute) to the #confirmDialog div.Then, you can get the selected value with the OK button:
Note that you get the value before removing the dialog. And you should define the var
valueoutside the function.