Correcting the images path in the JS

var a = "/assets/images/",

I modified this path to →

var a = "../assets/images/",


But it is taking somewhere else.

I wanted that this should rendedr this path:,

but it is rendering,

what is the solution?

I’m going to assume the forum’s playing tomfoolery with ellipses again.
. means “this directory”
.. means “go up one directory.”
If your referencing file is index.php, then the path would be ./assets/images/valid_ico.png

1 Like

You’re not wrong. I have edited the post.

what does this mean?

Thanks I will remember.

The forum’s got some code in it that transforms .. into ... if it’s not inside code tags.

1 Like

This is a JS forum. I have two CSS questions. Can I ask here or open a new thread?
Link and tutorial/assignment is same.

Assuming the questions are not directly related to correcting image paths in JS, create a new thread in the CSS category for your new questions.

1 Like

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.