+ Start a Discussion

Using visual Force page as Homepage component.


I have a visual force custom search developed, can I use it a home page component.

Here is the simple code for my Visual Force page and I want this to be a homepage component.

<apex:page showHeader="false" controller="quichSeachController">
<apex:form target="_top"> 
<apex:panelGrid columns="2" style="width:100%;height:100%;background:#e8e8e8"> 
<apex:outputLabel value="SSN" for="SSN"/> 
<input id="ssn" name="ssn" size="10" /> 
<apex:outputLabel value="DOB" for="DOB"/>
<input id="dob" name="dob" size="10" /> 
<apex:outputLabel value="TN" for="TN"/> 
<input id="tn" name="tn" size="10" /> 
<apex:commandButton action="{!go}"  value="Go!" styleClass="btn"/> 

I currently embed it using an iframe here is the code for that:
<P><IFRAME style="Z-INDEX: 220; WIDTH: 179px; 
POSITION: relative; HEIGHT: 100px" src="/apex/QuickSearch" 
frameBorder=0 scrolling=no target="_top">

 However I don't want to do that as it would make the page loading slower as this would load separately from the main page.

Any advice will be greatly appreciated.

Girish Suravajhula.


pintu francis qburstpintu francis qburst

I would not suggest using Iframes coz, its not appretiated by salesforce. and also if you are trying to load some content(say script) from non secure sites(http) most of the latest browsers will throw a warning of "loading unsecure content" coz secure sites will not compromise its security. and iframe is a best way to ppep in to the secure content.


Try instead writing pure html code in home page components and use 'Apex Web Services' to pull requred data through a javascript call...

Now you can create a homepage component of visualforce type. Just choose Visualforce Page while creating a new homepage component.