function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion 

Load URL in Modal Window -Lightning

Hi Everyone,
     I have a lightning component (a button on record detail page) that opens a new window when clicked. I want the new window to open in the modal window instead of a new tab. Can anyone help me with the code given below?

Lightning Component:

<aura:component controller="Utils" implements="force:lightningQuickAction,force:hasRecordId">
    <iframe width="720" height="480" scrolling="yes" src=""></iframe>
    <aura:attribute name="recordId" type="Id" />
    <aura:handler name="init" value="{!this}" action="{!c.openActionWindow}"/> 

Lightning Controller:

    openActionWindow : function(component, event, helper) {
        var oppId = component.get("v.recordId");
        var action = component.get("c.ActiveSessionId");
        var returnURL = $A.get("$Label.LightningDocUploadRetURL");
       action.setCallback(this, function(response) {
            var state = response.getState();
            if (state === "SUCCESS") {
              var tempVars = response.getReturnValue();
              var urlEvent = $A.get("e.force:navigateToURL");
                 "url": ''+tempVars+'&recordId='+oppId

    } ,

Now instead of I want the URL to go in that iframe. Can anyone help??