Monday 15 February 2010

javascript - Get data from jquery dialog when close the dialog -



javascript - Get data from jquery dialog when close the dialog -

i seek info jquery dialog box. got @ first time. next time info same code

window.$('<div align="center" style="width:100%;height:100%;"><iframe id="ictdg" src="item_new_cat.php?itty='+itty+'" width="100%" height="100%" frameborder="0"></iframe></div>') .dialog({ modal: true, width: 400, height: 250, title: 'new category registration', buttons: [{ text: "save , close", click: function(){ var nwcg=$('#ictdg').contents().find('#nwct').val(); alert(nwcg); // info not refress ??? $(this).dialog("close"); } }] });

try putting functionality in button click outside function, instead of:

buttons: [{ text: "save , close", click: function(){ var nwcg=$('#ictdg').contents().find('#nwct').val(); alert(nwcg); // info not refress ??? $(this).dialog("close"); } }]

try:

function getvalue(){ var nwcg=$('#ictdg').contents().find('#nwct').val(); alert(nwcg); // info not refress ??? $(this).dialog("close"); }

and

buttons: [{ text: "save , close", click: getvalue }]

i think happens when initialise dialog inline function runs 1 time , retruns same value.

javascript jquery

No comments:

Post a Comment