K. Tsang wrote:You say alert... would confirm box be more suitable. With confirm(), you can check for the ok or cancel buttons and act accordingly. Eg ok button trigger reload.
Also which window are you reloading or referring to? Current window/page or parent window (meaning current window in opened through say window.open())?
Bear Bibeault wrote:That's because you are using HTTP improperly and leave a dangling POST.
Please read this article on proper structure of web applications, and play particular attention to the PRG Pattern.
Bear Bibeault wrote:Use the PRG pattern. After the POST is completed, redirect to the page controller which creates a GET and will not try to re-run the POST upon refresh.
If you have your task controllers and page controllers mixed up, then your design needs attention. Read the article again. Task controllers should react to submissions; page controllers should prepare pages for display. Too many people put both task and page control in the same action. They should be separate.