Win a copy of Rust Web Development this week in the Other Languages 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

Struts html:button behavior question!

Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.

WHAT is your favorite color? Blue, no yellow, ahhhhhhh! Tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
    Bookmark Topic Watch Topic
  • New Topic