You need to sign in to do that
Don't have an account?
Hitesh chaudhari
I am trying to add static resource in visualforce page containing JS file.
But when I am trying to add it is giving error 404 (Not Found).
Unable to use js file as static resource in visual force page
I am trying to add static resource in visualforce page containing JS file.
But when I am trying to add it is giving error 404 (Not Found).
Greetings to you!
The reason for getting this error is that you're not using the right syntax, or don't have the filename exactly right.
Please refer to the below links which might help you further with the above requirement.
https://salesforce.stackexchange.com/questions/73899/visualforce-cant-access-archived-static-resource
https://salesforce.stackexchange.com/questions/11867/unable-to-access-nested-files-in-static-resource
https://stackoverflow.com/questions/5537954/salesforce-zipped-css-in-static-resource-are-not-rendered-why
https://developer.salesforce.com/forums/?id=9060G000000MVAfQAO
http://www.sfdcpoint.com/salesforce/use-static-resource-in-visualforce/
I hope it helps you.
Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.
Thanks and Regards,
Khan Anas
https://trailhead.salesforce.com/en/content/learn/modules/visualforce_fundamentals/visualforce_static_resources
Use the $Resource global variable and the URLFOR() function to reference items within a zipped static resource.
The URLFOR() function can combine a reference to a zipped static resource and a relative path to an item within it to create a URL that can be used with Visualforce components that reference static assets. For example, URLFOR($Resource.jQueryMobile, 'images/icons-png/cloud-black.png') returns a URL to a specific graphic asset within the zipped static resource, which can be used by the <apex:image> component. You can construct similar URLs for JavaScript and stylesheet files for the <apex:includeScript> and <apex:stylesheet> components.