在A页面中ajax请求页面B,然后再A中的一个div开展展示,判断用户是否登陆进行整个页面的跳转
在A页面中ajax请求页面B,然后再A中的一个div进行展示,判断用户是否登陆进行整个页面的跳转
如题,现在我是通过前台在ajax中判断session中的user是否为空然后进行window.location.href的跳转,不过这个有个问题就是必须刷新一下,不然js变量还是记录原来的session值,于是就出现,登陆界面出现在B页面,这个很不好,
如图

如何能这个页面跳转至登陆页面呢????
求教了???
------解决思路----------------------
window.location.href
==>
top.location.href
------解决思路----------------------
在登录页增加 js
如下
if(parent.window.document.getElementById('iframeContain')){
window.parent.location.reload();
}
if(parent.parent.window.document.getElementById('iframeContain')){
window.parent.parent.location.reload();
}
}
其中iframeContain 是 主框架中的一个特有的id
------解决思路----------------------
用jsp 代码来判断session 是否为空 然后 跳转
------解决思路----------------------
登陆页加
if(location!=top.location)top.location=location;
------解决思路----------------------
http://blog.****.net/zuxianghaung/article/details/7270489
如题,现在我是通过前台在ajax中判断session中的user是否为空然后进行window.location.href的跳转,不过这个有个问题就是必须刷新一下,不然js变量还是记录原来的session值,于是就出现,登陆界面出现在B页面,这个很不好,
如图
如何能这个页面跳转至登陆页面呢????
求教了???
------解决思路----------------------
window.location.href
==>
top.location.href
------解决思路----------------------
在登录页增加 js
如下
if(parent.window.document.getElementById('iframeContain')){
window.parent.location.reload();
}
if(parent.parent.window.document.getElementById('iframeContain')){
window.parent.parent.location.reload();
}
}
其中iframeContain 是 主框架中的一个特有的id
------解决思路----------------------
用jsp 代码来判断session 是否为空 然后 跳转
------解决思路----------------------
登陆页加
if(location!=top.location)top.location=location;
------解决思路----------------------
http://blog.****.net/zuxianghaung/article/details/7270489