aspose file tools*
The moose likes Struts and the fly likes Struts html:button behavior question! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts html:button behavior question!" Watch "Struts html:button behavior question!" New topic
Author

Struts html:button behavior question!

preetham kk
Greenhorn

Joined: Dec 18, 2005
Posts: 1
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.

Thanks>
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Struts html:button behavior question!