I added a javascript static resource to a folder called VisualForceElements like so:

enter image description here

Then within my opening <apex:page> I make the call to reference the resource like so:

<apex:includeScript value="{!$Resource.LookupJS}"/>

But unfortunately I keep getting this error:

Error: Static Resource named LookupJS does not exist. Check spelling

I tried also including the folder name like so:

<apex:includeScript value="{!$Resource.VisualForceElementsLookupJS}"/>

but that didn't work either. Any thoughts or suggestions?

  • 1
    Document is not the same thing as Static Resource. – Adrian Larson Sep 28 '15 at 22:00
  • 1
    Sorry, that was my bad. Long day? Perhaps someone else new to SF will make the same stupid mistake. – Xtremefaith Sep 29 '15 at 16:27

You want to upload it as a Static Resource under Setup -> Develop -> Static Resources. You're inserting it as a Document object currently :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.