I'm having troubles with a page redirection. I have a piece of code which on certain stage of execution suppose to redirect the page to other address. But for some reason it doesn't.
For some reasons I have to use javascript and this is the code I used:
window.location.assign("http://www.myaddress.com")
the full code:
<head runat="server">
<title>try mail</title>
<script type="text/javascript">
function openWin() {
myWindow = window.open('myaddressgoeshere', '', 'width=600,height=400');
myWindow.focus();
}
<body>
<form id="form1" runat="server">
<div>
<table width="300px" border="0" cellpadding="0" cellspacing="0">
<tr>
<td> <img src="imagesNew/mail.jpg" width="75" height="52"/></td>
<td> </td>
</tr>
<tr>
<td colspan="2"> </td>
</tr>
<tr>
<td colspan="2" align="center"><div id="signin"></div></td>
</tr>
</table>
</div>
</form>
<script type="text/javascript" language="javascript">
scope = ["wl.signin", "wl.basic", "wl.offline_access", "wl.emails", ],
function id(domId) {
return document.getElementById(domId);
}
WL.Event.subscribe("auth.sessionChange",
function (e) {
if (e.session) {
displayMe();
authLogin();
}
else {
clearMe();
}
}
);
function authLogin(e) {
if (e.status == 'connected') {
WL.Event.unsubscribe("auth.login", authLogin);
window.location.assign("http://www.hotmail.com");
WinJS.Navigation.navigate('files.html');
}
}
</script>