You need to sign in to do that
Don't have an account?
MRDJ
Static Resources in vf page for datatable is not working
Hello,
I am trying to upload the below three components, JS and CSS in static resources to reference in VF page.
When I use like this, working great! no issues.
<apex:includescript value="//code.jquery.com/jquery-1.11.1.min.js" / >
<apex:includescript value="//cdn.datatables.net/1.10.4/js/jquery.dataTables.min.js" />
<apex:stylesheet value="//cdn.datatables.net/1.10.4/css/jquery.dataTables.css" />
But when I use like this, create a zip file and then subfolders js and css then refrence the static resource in vf page is not working.
<apex:includeScript value="{!URLFOR($Resource.DataTable, 'js/jquery-1.11.1.min.js')}"/>
<apex:includeScript value="{!URLFOR($Resource.DataTable, 'js/jquery.dataTables.min.js')}"/>
<apex:stylesheet value="{!URLFOR($Resource.DataTable, 'css/jquery.dataTables.css')}"/>
Please help me how to work them using as statis resource. Thanks,
I am trying to upload the below three components, JS and CSS in static resources to reference in VF page.
When I use like this, working great! no issues.
<apex:includescript value="//code.jquery.com/jquery-1.11.1.min.js" / >
<apex:includescript value="//cdn.datatables.net/1.10.4/js/jquery.dataTables.min.js" />
<apex:stylesheet value="//cdn.datatables.net/1.10.4/css/jquery.dataTables.css" />
But when I use like this, create a zip file and then subfolders js and css then refrence the static resource in vf page is not working.
<apex:includeScript value="{!URLFOR($Resource.DataTable, 'js/jquery-1.11.1.min.js')}"/>
<apex:includeScript value="{!URLFOR($Resource.DataTable, 'js/jquery.dataTables.min.js')}"/>
<apex:stylesheet value="{!URLFOR($Resource.DataTable, 'css/jquery.dataTables.css')}"/>
Please help me how to work them using as statis resource. Thanks,
To reference a file in an archive, use the URLFOR function. Specify the static resource name that you provided when you uploaded the archive with the first parameter, and the path to the desired file within the archive with the second. For example:
Can you please confirm again path of that file and also follow the correct format of the path as I have mentioned above.
Thanks
Sandeep Singhal
http://www.codespokes.com/.
I have followed the same, but it didn't work. As I mentioned in my question.DataTable is zip file. After extract it has folders js and css
js subfolder contains the files jquery-1.11.1.min.js and jquery.dataTables.min.js
css subfolder contains the file jquery.dataTables.css
Based on this I have wrote as below
<apex:includeScript value="{!URLFOR($Resource.DataTable, 'js/jquery-1.11.1.min.js')}"/>
<apex:includeScript value="{!URLFOR($Resource.DataTable, 'js/jquery.dataTables.min.js')}"/>
<apex:stylesheet value="{!URLFOR($Resource.DataTable, 'css/jquery.dataTables.css'
This didn't work.