You can pop up a browser window with no back button or other controls:
<html>
<head>
<script LANGUAGE="JavaScript">
<!--
/* Browsercheck: */
nn=(navigator.appName=="Netscape")?1:0;
ie=(navigator.appVersion.indexOf("MSIE")!=-1)?1:0;
function popup(page,width,height)
{
if (nn){viewpage=window.open(page,"","scrollbars=1,screenX=0,screenY=0,width="+width+",height="+height);}
if (ie){viewpage=window.open(page,"","scrollbars=1,top=0,left=0,width="+width+",height="+height);}
}
//-->
</script>
</head>
<body>
<a href="javascript:popup('http://Host:portNo/myUri,600,400);">Click here to open window</a>
</body></html>
I've looked into this, and can't see any way to do it in JavaScript - I don't think you can empty the History list (because of security concerns).
I dimly remember some HTML tag which defines when a page expires (so if you set it to a previous date, presumably the browser won't cache it?) but I may be dreaming on that one ;-)
...so, the only other option I can think of is the one I previously posted, where you don't let 'em have a back button to press!!
Let me know if you find any other solutions
M
I have repeatedly tried to do this and had to eventually come up with a workaround.
I simple open JSP#1 in the popup window, with a link to jsp#2 with no link back....because the window does not have a back button, the user can only close window which will only send him back to the original window where he was before JSP#1 was brought up.
Kind of weird, but it did the job for me.
Hi !
In your situation I would do something like (you code it as you like ;-) ):
JSP1
-
If the previous page (must be something like "referrer") is different from JSP2, load the normal content.
Else goto JSP2.
JSP2
-
Hiding the back button seems quite useless to me, because I never use it myself !
Instead I use Alt + leftArrow (on windows and IE, I can't tell for other systems or browsers), or right click - back, so if others do the way I do, they'll be able to go to JSP1 anyway !
I hope this can help you in any way !
stephmor