This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Java Interview Guide and have Anthony DePalma on-line!
See this thread for details.
The moose likes Struts and the fly likes Struts 2 <s:submit action > and javascript help Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts 2 <s:submit action > and javascript help" Watch "Struts 2 <s:submit action > and javascript help" New topic

Struts 2 <s:submit action > and javascript help

Mars Mondal

Joined: Jan 01, 2011
Posts: 14
Helleo everyone,
I have a webpage with three different search options. Each option has a radio button clicking on which enables the text fields and buttons in that option with the help of java script. The first options allows to search by PIN. Second one by SSN, DOB and DOBRange, And 3rd one by various combinations of the name. The javascript I use to do this is given below:

This works fine but the problem is we have 3 submit buttons with differnt actions using the normal <s:submit> works fine but when I use <s:submit action="Search1"> the javascript does not render. Here is an example of my jsp code:

Similarly for the other options. This does not seem to work. However if I use the same code without specifying an action it works.

Any idea what I need to change in my javascript or jsp to get this to work?
I agree. Here's the link:
subject: Struts 2 <s:submit action > and javascript help
It's not a secret anymore!