これは私が達成しようとしているものですが、それは私に「未定義」を与え、ダイアログボックスを開く前にトリガされます。Jquery UIダイアログボックスを使用して変数を設定し、それにアクセスする
$(".shipment_refund").click(function (e) {
e.preventDefault();
var sel_option;
var dialog = $('<p>Are you sure you want to refund this shipment? If yes then</p>').dialog({
buttons: {
"With Shipment fee?": function() {sel_option = 1;},
"Without Shipment fee?": function() {sel_option = 0;},
"Cancel": function() {
dialog.dialog('close');
}
}
});
alert(sel_option);
});
が、同じエラーの助けを:( –