You need to sign in to do that
Don't have an account?
Problem with using static resources
Hello, i was trying to include static resources on my page with tags <apex:includeScript> and <apex:stylesheet>.
I used URLFOR to map the right path to resources.
So i wrote code:
<apex:includeScript value="{!URLFOR($Resource.all_res, '/js/json2.js')}" />
and like this.
As a result script wasn't included, and in the firebug debug window wrote this text:
"Failed to load source for: https://c.na7.visual.force.com/resource/1279700783000/all_res/js/json2.js"
I looked to "https://c.na7.visual.force.com/resource/1279700783000/all_res" in browser and it is really my static resource. After that i looks to "https://c.na7.visual.force.com/resource/1279700783000/all_res/js/json2.js" and find an empty page there. How it possible? Where i miss? And how can i include my recources?
try giving this command
<apex:includeScript value="{!URLFOR($Resource.all_res, 'js/json2.js')}" />
If you mean try without "/" in inner path to resources - I tried it. Nothing change.
Did you produce the resource file on a mac? Many people have found that the default way of creating a zip file on a mac seems to add a root directory with the same name as the zipped folder. So the path would be
{!URLFOR($Resource.all_res, '/all_res//js/json2.js')}
(Assuming your source folder was originally all_res )
No, i created package in windows.
Five minutes ago i have returned to this problem and without any ideas to make right solution create package again. And it works 0_o. Probably i miss somewhere when did it last time. Thanks to all who was trying to help. Topic might be closed.