I want to redirect to Login page from every page in my website after session timeout. I try to set window.location to the login page:
var ParentUrl = encodeURIComponent(window.parent.location.href);
document.location.href = "~/Login.appx?ReturnUrl=" + ParentUrl;
but "~" seems to be unsupported. my Login page is located under my root folder.
for example: *http://server/website/*Login.aspx
How can I get this url in javascript?
Thanks a lot,
Inbal.
window.parent.location.href
? – Unfolded