I have 2 different approaches to create a dialog with Jquery
This one don´t work:
var options = "{width: 1024, height: 600, modal: true, buttons: { Cancelar: function () { $(this).dialog('close'); } }, draggable: false, resizeble: false}";
$('#UserSettings').dialog(options);
and this one works fine:
$('#UserSettings').dialog({ width: 1024, height: 600, modal: true, buttons: { Cancelar: function () { $(this).dialog('close'); } }, draggable: false, resizeble: false });
Can´t figure out why.
Remove the quotes for the options in the first one. The argument to the dialog is an object and not string.