0
<div id="dvMsg" style="display:none;" title="Dialog Title">   
 <iframe id="ifrmMsg"></iframe>  
</div>

$("#dvMsg").dialog({
     position: 'center',
        dialogClass: 'transparent',
        title: ' ',
        draggable: false,
        width: 750,
        height: 530,
        resizable: true,
        modal: true,
        draggable: false,
        hide: {
            effect: 'highlight',
            duration: 800
        },
        close: function () {
            $("#ifrmMsg").contents().find("[id*=btnClearSession]").click();
        },
    }); 

button (id=btnClearSession) is placed inside the IFrame asp.net page, how to trigger the button inside the IFrame while closing the jquery dialog. It's possible to call btnClearSession_Click() event from Iframe cs page.

0143.NetUser
  • 29
  • 1
  • 13
  • you might want to look at this : http://stackoverflow.com/questions/251420/invoking-javascript-code-in-an-iframe-from-the-parent-page – Emil Condrea Nov 06 '13 at 11:34
  • It totally depends on if iframe URL is from the same domain or other. If its from other domain than there is no simple way, otherwise you can use post message (http://benalman.com/projects/jquery-postmessage-plugin/) – Aamir Afridi Nov 06 '13 at 12:01

1 Answers1

0

you have to use : trigger('click') http://api.jquery.com/trigger/

mehmetakifalp
  • 445
  • 5
  • 16