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
BeckaSBeckaS 

Using Static Resources?

I uploaded a zipped folder as a Static Resource, and I am trying to reference an .htm file in there on my Visualforce page. It appear that my coding is formatted correctly, but my page is blank. Any thoughts on what I'm missing are greatly appreciated! This is my first stab at this...

 

<apex:page >
<apex:pageBlock >
  <apex:includeScript value="{!URLFOR($Resource.PricingTool, '/Portfolio Pricing/Portfolio Pricing.htm')}"/>
</apex:pageBlock>
</apex:page>

Best Answer chosen by Admin (Salesforce Developers) 
BeckaSBeckaS

Ahhh, I realized where I was getting mixed up. I broke down the parts for my .zip into different static resources & referenced them that way.

 

Success!

All Answers

Venkat PolisettVenkat Polisett

<apex:includeScript value="{!Resource.example_js"}/>

 

is converted by visualforce page into the below. Below is what the browser sees:

 

 

<script type='text/javascript' src='/resource/1233160164000/example_js'>

 

 

 

You cannot pull in htm snippets into your page using includescript.

 

Use the below example snippet:

 

<!-- Page: --> <apex:page id="thePage"> <apex:outputText value="(page) This is the page."/><br/> <apex:include pageName="include"/> </apex:page>

<!-- Page: include --> <apex:page id="theIncludedPage"> <apex:outputText value="(include) This is text from another page."/> </apex:page>

 

 

 

Message Edited by Venkat Polisett on 05-20-2009 02:43 PM
BeckaSBeckaS

Ahhh, I realized where I was getting mixed up. I broke down the parts for my .zip into different static resources & referenced them that way.

 

Success!

This was selected as the best answer