• Post Reply Bookmark Topic Watch Topic
  • New Topic

change the staus of link  RSS feed

 
Megha Singhal
Ranch Hand
Posts: 225
IBM DB2 Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • 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
 
Jeanne Boyarsky
author & internet detective
Sheriff
Posts: 36446
454
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • 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
  • 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
 
Prasad Krishnegowda
Ranch Hand
Posts: 672
4
Eclipse IDE Java Spring
  • Mark post as helpful
  • send pies
  • 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?
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!