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

Not able to make Static Resources work

I'm having some issues trying to get Static Resources to work.


I am trying to work with extjs.  I have uploaded a zip file ( to static resources and named the static resource extsfdc.  Cache control is set to public.


Here is the code I am using:




<apex:page standardController="account"> <apex:form id="theForm"> <apex:pageBlock title="New Account" mode="edit"> <apex:pageBlockButtons > <apex:commandButton value="Save" action="{!save}"/> </apex:pageBlockButtons> <apex:pageBlockSection columns="1"> <apex:inputField value="{!}"/> <apex:pageBlockSectionItem > <apex:outputLabel value="Number of Employees"> <apex:outputPanel > <c:inputSlider></c:inputSlider> </apex:outputPanel> </apex:outputLabel> </apex:pageBlockSectionItem> </apex:pageBlockSection> </apex:pageBlock> </apex:form> </apex:page>








<apex:component > <apex:attribute name="min" type="integer" description="Minimum Value"/> <apex:attribute name="max" type="integer" description="Maximum Value"/> <apex:attribute name="value" type="string" description="The value attribute"/> <apex:stylesheet value="{!URLFOR($Resource.extsfdc, 'resources/css/xtheme-gray.css')}"/> <apex:stylesheet value="{!URLFOR($Resource.extsfdc, 'resources/css/ext-all.css')}"/> <apex:includescript value="{!URLFOR($Resource.extsfdc, 'adapter/ext/extbase.js')}"/> <apex:includescript value="{!URLFOR($Resource.extsfdc, 'ext-all.js')}"/> <div id="basic-slider"></div> <apex:inputText value="{!value}" id="noe"/> <script> Ext.onReady(function(){ var slider = new Ext.Slider({ renderTo: 'basic-slider', width: 214, minValue: {!min}, maxValue: {!max} }); slider.on('change', function(slider,value){ document.getElementByID('{!$Component.noe}').value = value;}); }); </script> </apex:component>



Both compile without errors and the page renders but the slider does not display.


Any help would be appreciated.




Best Answer chosen by Admin (Salesforce Developers) 

found it - typo....


/adapter/ext/extbase.js should have been


All Answers


This thread might be helpful. Use your browser to examine the generated URL, and to discover whether the script is indeed loaded. If you get the URL wrong, the compiler doesn't tell you.


Also, Firefox and Firebug should be your friend. You can inspect the DOM and js variables, trace and execute arbitrary js, and more.


found it - typo....


/adapter/ext/extbase.js should have been


This was selected as the best answer



I am trying to use ExtJS for the first time. I tried to test this example. For some reason, the component does not show up, it appears as a text box.


I uploaded the file as "ext"


The static Resoruce references are:

  <apex:stylesheet value="{$Resource.ext}/resources/css/ext-all.css"/>
  <apex:includescript value="{!$Resource.ext}/adapter/ext/ext-base.js"/>
  <apex:includescript value="{!$Resource.ext}/ext-all.js"/>



Appreciate any comments .