I want to know whether browser's back button is clicked or not?
In my application i have problem. My application performs in such a way that if user successfully submits the data a email will be generated and will be send to respective user who has submitted the request. After that if the user clicks on the browser's back button the second email will be received by the user this is what we would not except.
Is it possible to get the browser's back status into Servlets so that we can restrict the condition for sending a email?
Let me know incase of any concerns you have.
If possible get me the code as well
Technolgies using:
.htm, Java servelts, java script.
Status:
Open Sep 14, 2007 - 03:41 AM
Java servlets, browsers, JavaScript
6answers
Answers
Sep 17, 2007 - 02:31 PM
Sorry I am not a Java guy but maybe you can do the same what we do in .Net. There is a property called IsPostBack which is true if a page is reloaded based on a post back event. If a button is clicked, the page does a post back. if the user hits the back button, the page load is not through a post back. So if you do the email send only On Post back you should avoid sending it twice.
Cheers
Peter
Sep 17, 2007 - 08:46 PM
Thanks for your response.
But in my application am using the email functionality in doGet() method of the Servlet i can not modify the email sending functionality from doGet() method will be automatically called when page reloads again.
So please suggest me is there any other way to know the back button status i.e. if user clicked on the browser's back button or not by usnig java script or java servlets.
So please suggest me is there a
Sep 18, 2007 - 12:00 AM
Thanks for quick response.
I could not get the solution over the link which you have provided to me.
Let me get some more suggesstions on this.
Mar 04, 2009 - 05:57 AM
The question looks to be abandoned by the user who asked it. If no action is taken within 2 days, a Quomon Moderator will consider closing the question and distributing the points.
The Quomon Team
Dec 27, 2010 - 03:33 AM
Hey, are you bothered with the slow internet connection, here is an easy to solve your problem, to install a PC protector or cleaning, according to my personal experience, Tuneup360 is good choice, and your computer takes only 30 sec to start up if you have it!!
Answer this question
Share Your Own Experience & Expertise
We look to ensure that every question is answered by the best people with relevant expertise and experience, the best answers include multiple perspectives. Do you have relevant expertise or experience to contribute your answer to any of these commonly asked questions?
Add New Comment