Forum Moderators: open
var="sample/images/myimage.jpg";
is this relative to the file and directory in which the javascript is in?
e.g if it runs in mydomain.com/test/, it will be mydomain.com/test/sample/images/myimage.jpg?
var="/sample/images/image.jpg";
is this relative to the server root?
Thanks.
if you do something like this:
var URL = "";
URL = "mydomain.com/test/"
var path ="sample/images/myimage.jpg";
var URL += path;
location.href= URL;
then yes, the path will be relative to the root.