• 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:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

change the staus of link

 
Ranch Hand
Posts: 225
IBM DB2 Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
in my jsp page , functionality is their to change the status of the employee, so i want that if i click on activate it should change the link to the deactivate and when i click on deactivate it should change to activate.

how can i do that? please help
 
author & internet detective
Posts: 41878
909
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm not sure I understand your scenario. Do you have an activate button on the page? If so, you want to change the link without going to the server? That can be done in JavaScript.
 
Megha Singhal
Ranch Hand
Posts: 225
IBM DB2 Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
activate to deactivate button is done through search function in jsp but the thing when i am getting result in the table format from the database the deactivate link is appended with each row so when i click on deactivate it should change to activate and correspondingly to the database the status of employee become deactivate and he or she can't log into through login page.
but the problem is how to get the row id of each row so that when i am calling javascript to change the status deactivate to activate that change has to be done in particular row only not on the all the rows because when i am clicking on deactivate , i am calling javascript function through that how should i call the controller that function should apply only on the particular row , not on all the rows.

i am doing this project through spring mvc
 
Ranch Hand
Posts: 672
4
Eclipse IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How is the data been displayed now? Is it in Table?
Is it through only Javascript or DOJO/JQuery Data tables been used? What's the unique id in the row, that you can use to identify the record uniquely?
 
reply
    Bookmark Topic Watch Topic
  • New Topic