次のように文字列をダイアログに渡したい:
('#buttonSaveRight').click(function () {
if (!ErrorHandlingSaveDialog()) {
return false;
}
var nr = "testdata1";
$("#dialogSaveConfirmation").data('param', nr).dialog('open');
return false;
});
次のように受け取ります。
$('#dialogSaveConfirmation').dialog(
{
autoOpen: false,
modal: true,
width: "auto",
buttons: {
"Save": function () {
var nr= $('#dialogSaveConfirmation').data('param');
alert(nr); //this is just for testing if I recieved the data or not
//etc
私は何を間違っていますか?ダイアログにデータを渡す他の方法はありますか?
よろしくヨハン