• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

change 'action' path dynamically inside JSP.

 
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


The same searchpage is required for different process like EditHRDetails,EditSalarydetails. on choosing employee I need to call
showHRdetail.do or showSalarydetail.do depending on the process.

How do I change the action inside the searchpage based on the process I will be doing? Is this possible?
 
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, you can do this. How to do it depends on how you design the page. One way to do it would be to have the onclick event attached to the table row (i.e. the <tr>) set some hidden field to indicate which row was selected and then change the backgroud so that it looks highlighted. You could then have two different buttons, one to edit HR Details and the other to edit Salaray details. The onclick even for each of the buttons would change the action and then submit, just as you're doing now with the onclick event of the <tr> element.
[ March 02, 2007: Message edited by: Merrill Higginson ]
 
reply
    Bookmark Topic Watch Topic
  • New Topic