开发者

Issue loading results of an href in a target div

I'm using jstree and therefore jquery, but I'm as new to jquery as you can be. I have code that displays a tree, and when an item is clicked the details for that item load in a separate div. This works perfectly... except in one case.

The code I have for selecting a tree item is as follows:

.bind("select_node.jstree", function (e, data) {
    href = <code to build href>;
    $("#targetDiv").load(href);
});

We're running this web app in WebLogic. The only issue we have is when the session times out (30 mins). If someone clicks any button or link on the screen after the session times out, they are redirected to the login screen to log in again. However, if the user clicks开发者_如何学Go a tree item after the session times out, the login page is displayed in the target div. Instead, we need the login page to populate the entire screen like it does at other times.

I'm so new with jquery that I'm not sure what the best plan of attack for this would be. Any ideas or help is strongly appreciated.

Thanks.

  • Jeff


Try redirecting to the login page from javascript.

When you get a request and the session has timed out, return a page containing something like:

<script type="text/javascript">
    window.location = "http://yoursite.com/login";
</script>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜