Salesforce Static Resource Javascript And CSS -


i have requirement need create sf installable , trying keep few static resources possible. in fact, trying have 1 big static resource. facing problem. have put css files in 1 large file , have accessed the files within in following way:

<apex:stylesheet value="{!urlfor($resource.jqueryresources, 'first.css')}"/> <apex:stylesheet value="{!urlfor($resource.jqueryresources, 'second.css')}"/> <apex:stylesheet value="{!urlfor($resource.jqueryresources, 'third.css')}"/> <apex:stylesheet value="{!urlfor($resource.jqueryresources, 'fourth.css')}"/> 

if in same file (i.e. jqueryresources) if keep few javascript files, unable access these files as:

<apex:includescript value="{!urlfor($resource.jqueryresources, 'javascript.js')}"/> 

i making work this

<apex:includescript value="{!$resource.javascriptresource}"/> 

where javascriptresource name of stand alone static resource containing javascript.js. how fix this??

this should working you. i've been able doing successfully. suggestion this.

here's apex code:

<apex:stylesheet value="{!urlfor($resource.myresources, 'test.min.css')}"/>

find code generated on actual page:

<link class="user" href="/resource/23423423340/myresources/test.min.css" rel="stylesheet" type="text/css" />

copy link/href new window. should bring css loading correctly. can strip away css file name , should left with:

https://srm--devfull--c.cs12.visual.force.com/resource/23423423340/myresources/

if go there prompt download static resource .zip file. can open , see if in fact there javascript.js file in root of folder or if elsewhere. i've had because upload resources (css,js,fonts) 1 large static resources several children directories containing them. doing helps me check sanity , has worked in solving problem.

let me know if once download static resource if can see .js files in root of directory.


Comments

Popular posts from this blog

c# - How to get the current UAC mode -

postgresql - Lazarus + Postgres: incomplete startup packet -

javascript - Ajax jqXHR.status==0 fix error -