Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

html submit button javascript issue

 
Ranch Hand
Posts: 148
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 148
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
What's gotten into you? Could it be this tiny ad?
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic