Win a copy of Svelte and Sapper in Action this week in the 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 ...
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Struts html:button behavior question!

Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm new to Struts and want to know if I'm doing anything wrong here.

My task is to get some data from the database and display using JSP and struts tags.

I've 3 different JSP's. The first JSP displays a list of all the ID's available to be selected for some process. These are listed along with a check box for each ID.
Once the user selects a checkbox, the user is navigated to a different jsp with all the ID details. This page uses struts logic:iterate, logic:present, logic:equal tags to display a list of value objects properties in a table. The user can add some values and submit on the 2nd screen.
(<html:button property="submitBtn" value="SUBMIT" onclick="doSubmit()"/ is used).

This operation takes the user to 3rd jsp where the user can Confirm the changes or Review the changes (CONFIRM, REVIEW are two separate buttons with OnClick event handlers). When the user clicks the Review button, a Java Script method is called and the user is navigated back to the 2nd screen or JSP. Till this point, I'm able to do all the work without any major problems.

Once the user edits the values on the 2nd screen the submit button on 2nd screen is not navigating to the 3rd jsp. I used alert to display some test message to see if the javascript function is called after edit. But looks like the function is not called.

The java script function's alert message is called the first time but not after navigating from the 3rd jsp. Am I doing anything wrong here ? What's strange is the same button's OnClick is working properly but not after navigating from a different page.

Any insights would be really helpful.

Don't touch me. And dont' touch this tiny ad:
the value of filler advertising in 2020
    Bookmark Topic Watch Topic
  • New Topic