How to open external application in iFrame using JavaScript

I would like to open my external application using iframe. Currently, It works in new window but not sure how to make it work in iframe.

I did some research but could not find proper solution.

Please show me a way to do this. Any help would be much appreciated!

@{   
    string BUrl = ViewBag.BUrl;
    string Token = ViewBag.Token;
    string BResponse = ViewBag.BResponse;
}   
<div id="output"></div>
<div id="divBBackground" style="position: fixed; z-index: 999; height: 100%; width: 100%; top: 0; left:0; filter: alpha(opacity=60); opacity: 0.6; -moz-opacity: 0.8;display:none"></div>

@section Scripts {
    <script>
        $(document).ready(function () {
            $.ajax({
                url: '@BUrl'.replace(/amp;/g, ''),
                type: 'GET',
                beforeSend: function (xhr) {
                    xhr.setRequestHeader('Authorization', 'Bearer ' + '@Token');
                },
                success: function (data) {
                    var params = [
                        'height=' + screen.height,
                        'width=' + screen.width
                    ].join(',');                 

                    var popUpB;

                    function showModalPopUp() {
                        popUpB = window.open("", "_blank", params);
                        popUpB.location.href = data.message;

                        popUpB.focus();
                        LoadModalDiv();
                    }

                    function LoadModalDiv() {
                        var bkgB = document.getElementById("divBBackground");
                        bkgB.style.display = "block";
                    }

                    function OnUnload() {
                        if (false == popUpB.closed) {
                            popUpB.close();
                        }
                    }

                    window.onunload = OnUnload;

                    showModalPopUp();
                },
                statusCode: {
                    400: function () {
                        alert("server returned a bad request response.");
                    }
                }                
            });
        });
    </script>
}