Reputation: 3457
I have this directory structure as shown
Inside the www folder as shown in the figure (www folder naming convention as per phonegap requirement) there are two items
customer folder
ORcapture.html
From ORcapture.html i am redirecting to a html page present under the customer folder ths way
window.location = "customer/index.html?qruuid="+uuid;
My question is
From customer/index.html file how can i redirect back to ORcapture.html ??
Please let me know how to redirect in this case ??
Upvotes: 1
Views: 3332
Reputation: 37701
Well, it's always best to use absolute URLs, when possible. In your example, it would be:
window.location = "/customer/index.html";
and
window.location = "/ORcapture.html";
If you still want to use relative URLs, you can denote a parent directory using ../
(instead of /
, which denotes a root dir) so the other one would be:
window.location = "../ORcapture.html";
but that would work only with URLs which are one level deeper than that html file (as opposed to the absolute URLs, which work from everywhere).
Upvotes: 1