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
Valli KValli K 

i want to create a lightning component same functionality as below existing vf page :

<apex:page standardController="Opportunity" extensions="Optydoc">
    <script>
        var i = 0;
        window.onload = function(){    
            document.getElementById('hiddenform').submit();
        }
        function countalert(){
            i++;
            if(i===3){
                window.parent.location.reload();
            }
        }
    </script>
    <form id="hiddenform" action="{!iframeURL}" target="JavaApplication" method="post" enctype="application/x-www-form-urlencoded">
        <input type="hidden" name="source" value="SFDC"/>
        <input type="hidden" name="opportunityId" value="{!OppId}"/>
        <input type="hidden" name="accountId" value="{!AccId}"/>
        <input type="hidden" name="primaryAssociation" value="Opportunity"/>
    </form>
    <apex:pageblock id="upload">
        <apex:pageBlockSection title="Upload Documents" columns="1">
            <iframe id="JavaApplication" name="JavaApplication" style="display:block;width:100%;height:550px" scrolling="no" ></iframe>
        </apex:pageBlockSection>
        <apex:pageMessages ></apex:pageMessages>
        
    </apex:pageblock>
</apex:page>
=====================
public with sharing class Optydoc {
    public String iFrameURL { get; set; }
    public Id OppID { get; set; }
    public Id AccID { 
        get{
            if(OppID!=null){
                Opportunity opp = [select AccountId from Opportunity Where Id=: OppID];
                return opp.AccountID;
            }
            return null;
        }
        set;
    }
    public Optydoc(ApexPages.StandardController stdController) {
        OppID = stdController.getRecord().Id;
        try{
         iframeURL = CustomSetting__c.getInstance('JavaApplication').endPointURL__c;   
             System.debug('Exceptionrwrr'+iframeURL);
         
        }catch(Exception e){
             System.debug('Exception'+e);
             
        }        
    }
Valli KValli K
Please help me in creating lightning component for the above code.