aspose file tools*
The moose likes Struts and the fly likes How to give action to individual buttons instead of giving it in FORM  tag Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "How to give action to individual buttons instead of giving it in FORM  tag" Watch "How to give action to individual buttons instead of giving it in FORM  tag" New topic
Author

How to give action to individual buttons instead of giving it in FORM tag

yerra reddy gatla
Greenhorn

Joined: Apr 25, 2006
Posts: 25
Hi

I am doing an application in struts..

My requirement is to do different operations based on the button that the user chooses.. I got the same thing with out struts capabilities(TLD)

But in struts I am getting problem.

When I am trying to give action to the individual buttons
It is saying that

"ACCORDING TO THE TLD, ACTION ATTRIBUTE MUST BE THERE IN THE JSP"

Let me know how to give action for buttons instead in FORM tag

Thanks in Advance

Regards
Yerra Reddy Gatla
vidya sagar
Ranch Hand

Joined: Mar 02, 2005
Posts: 580
Have some path for action attribute in <html:form>.

Then whenever user is clicking the button in your form,call different javascript function in which you can override the action attribute of form to different action.

hope this helps
yerra reddy gatla
Greenhorn

Joined: Apr 25, 2006
Posts: 25
Thank You VidyaSagar

Nice CAPTION


Regards,
Yerra Reddy
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to give action to individual buttons instead of giving it in FORM tag
 
Similar Threads
Is it worth it?
Can we apply struts tag libraries like struts-html.tld to a servlet file?
How to submit a form with out a name in javascript
Custom Struts Tag
How to check that which button is clicked in a page using struts