how to show a full page when presing the ok button in jquery dialog box in frameset
HI
I am using frameset and the codes are
<frameset rows="33px,*" frameborder="no" framespacing="0" border="0" onload="x()" >
<!--<frame src="logout.jsp">-->
<frame src="home.jsp" scrolling="no"> <!-- <frame src="home.jsp">-->
<frame src="template.jsp" name="content" >
</frameset>
now in each and every page i am checking whether there any sessions exist or not.
if not then go to failedsession.jsp
function x(){
var timeOut =1000 * <%=session.getMaxInactiveInterval()%>;
var lastActivity = new Date().getTime();
var x=2;
var checkTimeout;
checkTimeOut = function(){
if(new Date().getTime() > lastActivity + timeOut){
window.location.replace("failedSession.jsp");
//document.getElementById("b").innerHTML="session timed out";
// redirect to timeout page
}else{
x=x+1;
window.setTimeout(checkTimeOut, 1000); // check once per second
}}
checkTimeOut(); // this is where you insert checkTimeOut function so that when you call x(), this will execute in the end.
}
This is the failedsesion.jsp
var y1;
var z1;
var x1=<%=new Random().nextInt() %>;
if(x1%2==0)
{y1="explode";z1="clip";}else {y1="drop";z1="bounce";}
$(function() {
$( "#dialog" ).dialog({
autoOpen: true,
show: {
effect: z1,
duration: 1000
},
hide: {
effect: y1,
duration: 1000
}
});
$( "#dialog" ).click(function() {
$( "#dialog" ).dialog( "close" );
});
});
</script>
<div id="dialog" title="Session Expired">
<p>Your Session has been expired.Please close this browser and login again</p>
</div>
when the session is expired it displays as shown in the attached file.
My doubt is that when i press the cancel button then it should go to index.jsp page and frameset should be removed.
Can anybody help me in this issue?