File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes html submit button javascript issue Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Frameworks » Struts
Bookmark "html submit button javascript issue" Watch "html submit button javascript issue" New topic
Author

html submit button javascript issue

Vicky Pandya
Ranch Hand

Joined: Dec 16, 2004
Posts: 148
On page A click event I am adding page attributes to session. Upon clicking done on Page A action adds values to session and takes user to Page B. Now when user clicks browser back button and edits values on page A and clicks done it again adds new record with new values to session. How do I avoid/achieve this? Upon clicking back browser button I want to update the already added object from session but how my struts action will know/distinguish about this?
Vicky Pandya
Ranch Hand

Joined: Dec 16, 2004
Posts: 148
I thought following code might be helpful.
html:submit property= method on click=history back
bean:message key=buttonback
where, in back method of my LookupDispatchAction class I am deleting added record from the session so when user clicks done it should add new record. however since I have return null for this method it doesn't display previous page, I thought since I have onclick history back , this should work but its not working also I can't use return (new ActionForward(mapping.getInput())) in my action to return to previous page because this reads mapping from struts-config file to take me back and in my case I come from different action to this page. Any ideas?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: html submit button javascript issue