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
SalesRedSalesRed 

Include HTML page in Static Resource ZIp. Reference in Visualforce page.

Hello,

 

I am including content in a visualforce page from a zip file which I reference for the required element in the page.

For example I include an Image as follows

 

<img src="{!URLFOR($Resource.MyPageResources, 'img/my-logo.png')}" class="mt4" alt="My Logo" />

 

This works fine.

 

I was wondeirng. Can I put a HTML page in my zip file and reference this in my visualforce page, from my static resource.

 

IIf so, how would I reference this in my page?  I wasn;t sure how to reference full HTML.

 

Thanks in advance for any help!

Best Answer chosen by Admin (Salesforce Developers) 
Laxman RaoLaxman Rao

yes you can put the html file in zip file.

 

The way you have to refer is

 <apex:iframe src="{!URLFOR($Resource.Htmlcontent)}"/>

Htmlcontent is the static resource name

 

you can download the hml page from my demo site at http://devender-developer-edition.ap1.force.com/resource/Htmlcontent

 

let me know if u have any queries 

All Answers

Laxman RaoLaxman Rao

yes you can put the html file in zip file.

 

The way you have to refer is

 <apex:iframe src="{!URLFOR($Resource.Htmlcontent)}"/>

Htmlcontent is the static resource name

 

you can download the hml page from my demo site at http://devender-developer-edition.ap1.force.com/resource/Htmlcontent

 

let me know if u have any queries 

This was selected as the best answer
venkateswarluvenkateswarlu

i need to use that html pages inside the apex pages..

i don't wont to download that files..

i need to use that html pages in my help icons...