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
sfdcdev.wordpress.comsfdcdev.wordpress.com 

Using visual Force page as Homepage component.

Hello,

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.

Code:
<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"/> 
</apex:panelGrid> 
</apex:form>
</apex:page>

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

 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.

Regards,
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...

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