[Solved] I am submiting form in jquery whose response open in iframe which is PDF now i want to open that iframe as dialog please help me below is my code


As per the description & comment, You are trying to post some parameters to server & in response, you need to provide path to PDF.

Here is the code:

<link rel="stylesheet" href="https://code.jquery.com/ui/1.11.1/themes/smoothness/jquery-ui.css">
<script src="https://code.jquery.com/jquery-1.10.2.js"></script>
<script src="https://code.jquery.com/ui/1.11.1/jquery-ui.js"></script>

<div id="showDialog" title="Your Dialog Title Here" style="display: none;">

</div>
<form name="frmDemo" action="" method="post">
<input type="text" id="fileSlNo" name="fileSlNo" />
<input type="submit" value="Show Dialog" />
</form>

<script type="text/javascript">
$(function(){

    $('form').submit(function(event){
        event.preventDefault();
        var fileSlNo = $('#`').val();
        var data     = { pageMode: 'DOWNLOAD_FILE', fileSlno: fileSlNo };
        $.ajax({
            type: POST, 
            url:, 'folderNavigation.do',
            data: data,
            success: function(responseData){
                // supposing responseData is the url of PDF
                $('#showDialog').dialog('destroy'); 
                $('#showDialog').html('<iframe src="'+responseData+'"></iframe>').dialog({
                    height:400,
                    modal: true
                });
            }       
        });

    });

});
</script>

1

solved I am submiting form in jquery whose response open in iframe which is PDF now i want to open that iframe as dialog please help me below is my code