This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes Disable Refresh Button of IE ?? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Disable Refresh Button of IE ??" Watch "Disable Refresh Button of IE ??" New topic
Author

Disable Refresh Button of IE ??

Bikash Paul
Ranch Hand

Joined: Dec 04, 2001
Posts: 342
Hi,
Can I disable Refresh Button of IE. I want to disbale Refresh button because my problem is when user click on Refresh button then my jsp page again submitting and creating duplicate record in database.Can any one please guide me how i can prevent so that my jsp page should not be submitted on page refresh.
Thanks & Regards
Bikash
[ February 29, 2004: Message edited by: Bikash Paul ]
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
You need to figure out how to stop it on the server side.
First check if the record exsists. If it does then you do not enter it. One SQL query will solve you problem. There is no way to do it with JavaScript.
Eric
Yuriy Fuksenko
Ranch Hand

Joined: Feb 02, 2001
Posts: 413
You could have 2 pages:
1 - gets record from session and displays
2 - JSP or Servlet, that saves record
form on page 1 will submit data to page 2,
page 2 will save data in DB if needed and use response.sendRedirect to sent user to page 1.
Then he could refresh as much as he wants
Bikash Paul
Ranch Hand

Joined: Dec 04, 2001
Posts: 342
Hi all,
Thanks for suggestions.
Thanks & Regards
Bikash
 
Consider Paul's rocket mass heater.
 
subject: Disable Refresh Button of IE ??
 
Similar Threads
Query about event for refresh button??
Stop button of IE ???
Disable browser back button and refresh in jsp page
To Disable Back button in all the browsers
Disabling Back and Refresh/Reload button.