• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

window without menu bar ...

 
Ranch Hand
Posts: 175
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I have a JSP page (page1.jsp)that is opened in a window with menu bar, button bar and Address field. In this JSP page, there is a form from which I submit another JSP page (page2.jsp).
I want page2.jsp opens in the same window as page1.jsp, but without menu bar, button bar and Address field in the window.
Can someone tell me how to do it?
 
Sheriff
Posts: 7001
6
Eclipse IDE Python C++ Debian Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I really don't think this is possible. And more, I don't think it's wise either.
Can you tell us what you hope the benefit of hiding the commonly available button and address bars would be for the users your application?
 
Mike Yu
Ranch Hand
Posts: 175
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Because page2.jsp is only used for user to input some data and submit the data. So I don't users to other buttons. After the data is submit, it will return to page1.jsp that has all the commonly used features.
Do you have some better ideas?
 
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The problem here is that you want to send the data to page2.jsp by submitting the form, whereas you can only remove the menus etc using the javascript 'window.open()' function.
All is not lost, you can submit to a page, have that page gather the data and call window.open and pass on the data in the url then close itself.
Again we run into the problem that you are doing this to stop the user from using the buttons, and in reality you can't. You can remove the back button but you can't stop someone from pressing 'alt-back arrow'. You can remove the refresh button but you can't disable 'control-R'.
It sounds like what you are trying to achieve is stopping users from reloading a page that is the result of a submitted form. When they do this, it resubmits the form and you get duplicated data.
The way I normally manage this is to have page1.jsp submit to a Servlet, the Servlet processes the data then does a response.sendRedirect to the confirmation page. If they reload, they simply reload the confirmation page withour breaking anything else.
Dave
 
Frank Carver
Sheriff
Posts: 7001
6
Eclipse IDE Python C++ Debian Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Another top trick for preventing duplicates which I hardly ever see used is to generate a unique "transaction number" in a hidden field of the form each time the form is sent to the client. Then if a user submits the form more than once (deliberately, or as a result of a page refresh, etc.) the server can recognize that the form with that "transaction number" has already been processed, and handle it appropriately.
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There is always the world of cookies if you want to do it client side.
There are problems with cookies not being enabled or person clearing them out, but an easy way around a server side solution.
Session Cookies are a great thing!!
 
Mike Yu
Ranch Hand
Posts: 175
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you all for your useful input.
I have another question: when I update the data in the table, and refresh the page, I always get message like "This page cannot be refreshed without resending ....". Users have to press "Retry" so that the page can be reloaded.
Is it possible to get rid of this message or write code to do the same thing as clicking "Retry".
[ July 08, 2002: Message edited by: Mike Yu ]
 
Ranch Hand
Posts: 413
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
if you form is small, you coud use "GET" instead "POST" method - so form will be resubmitted without asking a user
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic