Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
yerra reddy gatla
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 580
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank You VidyaSagar

Nice CAPTION


Regards,
Yerra Reddy
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic