tags:

views:

1072

answers:

3

hi all,

I need to hide the address bar and status bar of a jsp page , "demo.jsp"

my code is

 <html>
 <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>Welcome</title>
</head>

    <frameset cols="10%,90%">
        <frame src="actions.jsp" name="page1"></frame>
        <frame src="default.jsp" name="page2"></frame>
    </frameset>

</html>
all i need to do is display the same page without address bar and status bar.

i tried doing

window.open("login.jsp", "eTIMS", "toolbar=0,location=0, directories=0, status=0, menubar=0,scrollbars=1,resizable=0,width=1014,height=714,left=0,top=0") inside the same page. But it keeps iterating. Also the previous page is still there. I also don't know how to close the previous page. any solutions?

more info:

tis is my jsp page where i check the username and password by accessing the database. i verify this using <% if (EmpBean.login()==0){response.sendRedirect("welcome.jsp"); } else{ response.sendRedirect("login.jsp?ch=2");} %> if correct then it goes to welcome.jsp.

i dont want the users of welcome.jsp to go back to my login page. i thought of keeping it as abstract as possible. please help me wit tis.

+1  A: 

What you're trying isn't possible. You can't use javascript to close a window you didn't open. And you definitely can't control how my browser displays a window that I already have open

Gareth
+1  A: 

Gareth is right, you simply can't do that, at least for all browsers: Firefox, for example, will always display the menu bar and status bar, at least as security feature (so you can't disguise a Web window as system window) and also to allow the user to keep control.
Also I don't see how doing that will prevent from going back (hit Backspace, use context menu, etc.).

You can't prevent users to go back in (browser) history, many people have tried without success, and you won't find anymore sites forbidding this. You should try an alternative way of coping with this.

Beside, since you generate pages, you should make a frameless design: using frames is so-XXth century... :-) Search a bit the Net to see why the use of frames is a bad idea, at least for usability reasons.

PhiLho
A: 

http://labs.mozilla.com/prism/

Prism is an interesting approach, it's essentially a browser without any taskbars.

Neil McKeown