0

Supposed you had the following setup in your WAP project.

In your root you had:

SomeFile.js
Images [folder]

and you had some javascript referencing an image:

iContainer.src = "images/" + s;

You then moved the .js file to Content\JS folder:

Content[folder]
    js[folder]
       SomeFile.js

and you moved images folder to Content\Images

Content[folder]
    images[folder]

The content folder is also in the root of the web project.

Then would you change that javascript to this:

sContainer.src = "/content/images/" + s;

or this:

sContainer.src = "../../content/images/" + s;

I think /content and content/ is the same.

1 Answer 1

1

I think ../images/ would do the work

Sign up to request clarification or add additional context in comments.

1 Comment

is that basically the only syntax that would work? obviously you can't do a ~/ in javascript.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.