var dlg = $("#dialog").dialog({ autoOpen: false, modal: true, buttons: { 'Update': function() { alert(clientCode); }, Cancel: function() { $(this).dialog('close'); } } }); $(".edit").click(function() { myval = $(this).parent().children('td:nth-child(1)').text(); dlg.dialog('open'); return false; });
How can I take "myval" and have it as the name of the dialog box? I tried passing it as an argument when doing dlg.dialog('open', myval) and with no luck. I also tried passing it as a parameter, but no luck. I'm probably doing something wrong.
jquery-ui
Kezzer
source share