Close jQuery UI dialog from page loaded within iframe -
i know there lot of threads regarding topic out there, none of them have helped me in trying do.
i attempting old system away window.showmodaldialog()
, using jquery ui dialogs, , trying minimal changes, turning issue because of of outdated javascript , stuff in here.
initial page:
$(document).ready(function(){ $("#searchdialog").dialog({ position: "center", autoopen: false, draggable: false, resizable: false, height: 650, width: 650, modal: true, dialogclass: 'searchdialog', closeonescape: true }); $('.searchdialog .ui-dialog-titlebar').each(function () { $(this).css("display", "none"); }); }); <div id="searchdialog" style="display:none; height: 650px; width:650px;"> <iframe id="searchdialogiframe" style="height: 625px; width: 625px;"></iframe> </div>
on button click function loads url passed in iframe contained in dialog div
function openmodalwindow(surl,sname,sfeatures,breplace){ $('#searchdialogiframe').attr('src', surl); $('#searchdialog').dialog('open'); }
the issue how system built load page includes usercontrols buttons on page add account or 'cancel' transaction, unsure in dom of how close page after click event of 'add' button pressed.
using code
$('#searchdialog').dialog('close'); or window.parent.$('#searchdialog').dialog('close');
this code not work. after that, don't know how figure out how traverse through dom figure call work close dialog.
Comments
Post a Comment