• MICHELE RENDA 28
  • NEWBIE
  • 0 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 1
    Likes Given
  • 1
    Questions
  • 2
    Replies
Hi,
I need to display Iframe in my lightning component.
This is one of  my components:
 
<aura:component controller="LeadCollectorController" >
   	

    <aura:attribute name="theLead" 
        type="Lead" 
        default="{ 'sobjectType': 'Lead',
                   'Rating__c': 2,
                   'Company': '',
                   'FirstName': '',
                   'LastName': '',
                   'Email': '' }"/>
    <form>
        <fieldset class="slds-box slds-container--fluid">

       
        <ui:inputText value="{!v.theLead.Company}" label="Company" class="input"/>
        <ui:inputText value="{!v.theLead.FirstName}" label="First" class="input"/>
        <ui:inputText value="{!v.theLead.LastName}" label="Last" class="input" />
        <ui:inputEmail value="{!v.theLead.Email}" label="Email" class="input" />
        <ui:button label="Save" press="{!c.save}"/>
        </fieldset>
    </form>
    
                    
    <iframe height="400px" id="theIframe" name="theIframe" src="https://www.google.com/maps" width="80%" title ="prova"></iframe>
   
</aura:component>
This is the App:​
 
<aura:application access="GLOBAL" extends="ltng:outApp">
    <aura:dependency resource="c:leadCollector"/>
</aura:application>
This is the VFP:
 
<apex:page standardController="Lead"  standardStylesheets="false" sidebar="false"  applyBodyTag="false" >
    <apex:includeScript value="/lightning/lightning.out.js" />
    <apex:includeLightning />

    <html xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" lang="en"/>

    <script>
        $Lightning.use("c:leadCollectionApp", function() {
            $Lightning.createComponent(
                "c:leadCollector",
                {},
                "theLead",
                function(cmp) {
                    console.log("Component created!");
                    console.log(cmp);
                });
            });
    </script>
    
    
    
    
    <div id="theLead"></div>
 
   
    
    
</apex:page>
When I load the page I can see only the form but not the Iframe.
If I use Chrome or Firefox I see only a blank space.
If I use Internet Explorer I read the error in the screenshot.
User-added image
Can you help me please?
Thanks.
Michele renda

 
Hi,
I need to display Iframe in my lightning component.
This is one of  my components:
 
<aura:component controller="LeadCollectorController" >
   	

    <aura:attribute name="theLead" 
        type="Lead" 
        default="{ 'sobjectType': 'Lead',
                   'Rating__c': 2,
                   'Company': '',
                   'FirstName': '',
                   'LastName': '',
                   'Email': '' }"/>
    <form>
        <fieldset class="slds-box slds-container--fluid">

       
        <ui:inputText value="{!v.theLead.Company}" label="Company" class="input"/>
        <ui:inputText value="{!v.theLead.FirstName}" label="First" class="input"/>
        <ui:inputText value="{!v.theLead.LastName}" label="Last" class="input" />
        <ui:inputEmail value="{!v.theLead.Email}" label="Email" class="input" />
        <ui:button label="Save" press="{!c.save}"/>
        </fieldset>
    </form>
    
                    
    <iframe height="400px" id="theIframe" name="theIframe" src="https://www.google.com/maps" width="80%" title ="prova"></iframe>
   
</aura:component>
This is the App:​
 
<aura:application access="GLOBAL" extends="ltng:outApp">
    <aura:dependency resource="c:leadCollector"/>
</aura:application>
This is the VFP:
 
<apex:page standardController="Lead"  standardStylesheets="false" sidebar="false"  applyBodyTag="false" >
    <apex:includeScript value="/lightning/lightning.out.js" />
    <apex:includeLightning />

    <html xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" lang="en"/>

    <script>
        $Lightning.use("c:leadCollectionApp", function() {
            $Lightning.createComponent(
                "c:leadCollector",
                {},
                "theLead",
                function(cmp) {
                    console.log("Component created!");
                    console.log(cmp);
                });
            });
    </script>
    
    
    
    
    <div id="theLead"></div>
 
   
    
    
</apex:page>
When I load the page I can see only the form but not the Iframe.
If I use Chrome or Firefox I see only a blank space.
If I use Internet Explorer I read the error in the screenshot.
User-added image
Can you help me please?
Thanks.
Michele renda

 
Hi  
I have a Lightning Component and want to display a inside a VF page. I read that the solution is to use Iframe, but it is not working for me.
Result (empty)
User-added image 
Component
<aura:component implements="force:appHostable,flexipage:availableForAllPageTypes,force:hasRecordId" access="global">
    
    <fieldset class="slds-box slds-container--fluid">
        <header class="slds-card__header slds-grid">
          <div class="slds-media slds-media--center slds-has-flexi-truncate">
                <div class="slds-media__figure"> 
                    <span class="slds-icon__container slds-icon-standard-account">
                        <c:svg class="slds-icon" xlinkHref="/resource/SLDS202/assets/icons/custom-sprite/svg/symbols.svg#custom31" />
                        <span class="slds-assistive-text">Transaction Icon</span>
                    </span>  
                </div>
                <div class="slds-media__body slds-truncate">
                    <h2><span class="slds-section__title" style="font-weight: bold;">Policies and Transactions</span></h2>
                </div>
            </div>	
        </header>
    
        <iframe src="{!'https://ausurebroking--partials.cs57.visual.force.com/apex/PoliciesAndTransactions'}" width="100%" height="300px;" frameBorder="0"/>

    </fieldset>
</aura:component>
What I am missing?
Thank you for your help.
Sylvie

 
Hi everyone,
In our project ideally, a third party application is hosting Visualforce pages in a iframe. Is it failiing on all the browsers, saying unable to load the content or X-FRAME OPTIONS TO DENY.

Can someone please guide me over this.

Many thanks.