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
Debbie61Debbie61 

How to modify VF page to show external website inline like a Web tab?

We have a VF page and tab designed to take the SFC to an external website. The reason we used a VF page instead of a Web Tab is because we have to submit a form with  hidden input fields to store the userid and password and some other parameters as a Post to the website to have the user automatically logged in.

 

I would like this page to work similar to a Web tab. Where the user would click on the tab and our external website shows up within the SFC tab. I can't figure out how to do this. Presently, my only option is to have the tab create a new browser window for the user.

Bhawani SharmaBhawani Sharma

Can you get the advantage of the :

<apex:tabPanel

on VF page.

Debbie61Debbie61

I tried that and it did not work as I wanted it to. When I click on the tab associated with the VF page, it leaves SFC all together and displays the external website. I want the external website to show up inside SFC just like a Web Tab.

Maybe there is something in my VF that is causing this behavior?

 

<apex:page Controller="SecurityDAO">    
  <apex:tabPanel >     

<script type="text/javascript">
    function adios () {
        var username = "{!Security.M4_Username__c}";
        if ( username != null ){
            var myform = document.getElementById("form1");
            myform.submit(); 
        }   
    }
    window.onload = adios;
    
</script>     
  
  <apex:messages styleClass="exceptionText"/> 
  <apex:pageBlock rendered="{!Security.M4_Username__c != null}">
  
  <h1>Welcome {!$User.FirstName} {!$User.LastName} to the Incident Tracking Logon Page</h1><p/>      
  <form id="form1" method="post" action="{!Security.Metrix_URL__c}">
  
    <input TYPE="hidden" name="username" value="{!Security.M4_Username__c}" /><br />
    <input TYPE="hidden" name="person_id" value="{!Security.M4_Username__c}" /><br />
    <input TYPE="hidden" name="password" value="{!Security.M4_Password__c}" /><br />
    <input type="hidden" name="myparam" id="myparam" value="sfclogin" />
    <input TYPE="hidden" name="xxxparam" value="{!Security.xxparam__c}" /><br />



<input type="submit" value="Incident Tracking Login" /><br />
</form>
  </apex:pageBlock>
  </apex:tabPanel>
</apex:page>

 

Bhawani SharmaBhawani Sharma

Use a visualforce page as an iframe in the tabpanel.

Debbie61Debbie61

If you could expound on this with an example, I would really appreciate it. I don't have much experience with VisualForce pages. Thank you!

Debbie61Debbie61

I am going to assume that based on a lack of any valid responses, this cannot be done.   :smileysad: