• 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

clear the field and disable the back button.

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,

I need to clear the field when i navigate from one screen to other and disable the back button.
example; index.jsp--->servlet1;

problem1;

on index.jsp i have two field say x and y which takes number as input from user.
when i click on the submit button it goes to servlet1.when i click on back button the previously entered data is still visible in two field x and y.

i try the below solution for the same but it is not working.



i am using tomcat as server.is there any configuration required at server side?

problem 2;

how to disable the back button in browser?
i try the below solution for the same but it is not working.





please help me out.


 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Rush,
Welcome to JavaRanch!

#1 - Are you using GET or POST to display X? If the later, the technique you described should work. However, you shouldn't use POST just to avoid the user going back. It results in an annoying website where one can't go back to anything and gives up. What's the harm in the user going back to that page.

#2 - This is easy. You can't disable the back button in any reliable way. it is a feature of the user's browser.
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please read InterfaceDesignersRule1
 
Rush Shah
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Jeanne Boyarsky/Bear Bibeault thanks for the reply.

Problem 1 : I have try using both Post and Get the fields are not getting cleared.

Problem 2: secondly I have gone through the InterfaceDesignersRule1 ,
The requirnment in my application is
1)when user click on any screen using browser back button then it user must see 404 or error page

2)There is seperate back button provided in application using which only the
user can go back.

Please help me out for the above problems fix.








 
It is no measure of health to be well adjusted to a profoundly sick society. -Krishnamurti Tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic