+ Start a Discussion
PbondalapatiPbondalapati 

how to show web page in vf page

I have 2 page blocks, 

first page blocks have out put links 

I need to show them in second page block

I am not sure how to do this requirement.

Can you please answer me 

 

<apex:page sidebar="false" showHeader="true">

<apex:form >
 <apex:pageBlock >
<apex:pageBlockSection collapsible="true" Title="Pre-Award Tools" columns="1">

<apex:outputLink value="http://www.gooogle.com">goole</apex:outputLink>

 


 <apex:pageBlock />

<apex:pageblock>

If user clicks the link i want to show google page in page block2 , how can i achive this requirement.

<apex:pageblock/>

<apex:form />

<apex:page />

Best Answer chosen by Admin (Salesforce Developers) 
Chamil MadusankaChamil Madusanka

Try following solution

 

<apex:page sidebar="false" showHeader="true" controller="LinkController">

<apex:form >
 <apex:pageBlock >
<apex:pageBlockSection collapsible="true" Title="Pre-Award Tools" columns="1">


<apex:commandLink value="Salesforce" reRender="iframe1" >
    <apex:param name="fb" value="http://salesforce.com" assignTo="{!linkforIFrame}"/>
</apex:commandLink>

<apex:commandLink value="Salesforce World" reRender="iframe1" >
    <apex:param name="fb" value="http://www.salesforceworld.blogspot.com" assignTo="{!linkforIFrame}"/>
</apex:commandLink>

<apex:commandLink value="Sabre Tecchnologies" reRender="iframe1" >
    <apex:param name="fb" value="http://sabretch.com/" assignTo="{!linkforIFrame}"/>
</apex:commandLink>

 
</apex:pageBlockSection>

 </apex:pageBlock>

<apex:outputPanel id="iframe1">
<apex:iframe src="{!linkforIFrame}" scrolling="true"/>
</apex:outputPanel>

</apex:form>

</apex:page>

 

public with sharing class LinkController {
    public String linkforIFrame{get;set;}
    
    public void methodOne()
    {
        System.Debug('linkforIFrame::::::::::::::::::'+linkforIFrame);
    }

}

 If a reply to a post answers your question or resolves your problem, please mark it as the solution to the post so that others may benefit.

All Answers

Edwin VijayEdwin Vijay

You will have to try using the "target" attribute of the outputlink tag i think.

Chamil MadusankaChamil Madusanka

Try following solution

 

<apex:page sidebar="false" showHeader="true" controller="LinkController">

<apex:form >
 <apex:pageBlock >
<apex:pageBlockSection collapsible="true" Title="Pre-Award Tools" columns="1">


<apex:commandLink value="Salesforce" reRender="iframe1" >
    <apex:param name="fb" value="http://salesforce.com" assignTo="{!linkforIFrame}"/>
</apex:commandLink>

<apex:commandLink value="Salesforce World" reRender="iframe1" >
    <apex:param name="fb" value="http://www.salesforceworld.blogspot.com" assignTo="{!linkforIFrame}"/>
</apex:commandLink>

<apex:commandLink value="Sabre Tecchnologies" reRender="iframe1" >
    <apex:param name="fb" value="http://sabretch.com/" assignTo="{!linkforIFrame}"/>
</apex:commandLink>

 
</apex:pageBlockSection>

 </apex:pageBlock>

<apex:outputPanel id="iframe1">
<apex:iframe src="{!linkforIFrame}" scrolling="true"/>
</apex:outputPanel>

</apex:form>

</apex:page>

 

public with sharing class LinkController {
    public String linkforIFrame{get;set;}
    
    public void methodOne()
    {
        System.Debug('linkforIFrame::::::::::::::::::'+linkforIFrame);
    }

}

 If a reply to a post answers your question or resolves your problem, please mark it as the solution to the post so that others may benefit.

This was selected as the best answer
Swapnil Patne 20Swapnil Patne 20
Hi there,

I am trying to implement above VF page but I get following error which I am unable to resolve.. could someone help please? 

Error: TecOutboundCallDashboard line 9, column 34: The value of attribute "value" associated with an element type "apex:param" must not contain the '<' character
Error: The value of attribute "value" associated with an element type "apex:param" must not contain the '<' character.

Thanks,
Swapnil