• Post Reply Bookmark Topic Watch Topic
  • New Topic

Struts html:button behavior question!  RSS feed

preetham kk
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.

  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!