The Zurich release has arrived! Interested in new features and functionalities? Click here for more

Slushbucket Add / Remove button : Override code

abhiyadav2001
Giga Expert

Hi,

 

I am using a slushbucket variable. I have a situation where I need to override the functionality of 'Add'   and 'Remove' button.

 

Its a list of users. If I click on Add button; Selected value (sys_id) should be added to another variable ( addedUserList is a single line text variable ). If I click 'Remove' ; the User should be added to 'removedUserList' variable.

 

I am searching for a way to override the existing functionality of 'Add / Remove' button.

 

Please let me know if anyone has an idea about how to do it?

 

Thanks,

Abhijeet

1 ACCEPTED SOLUTION

abhiyadav2001
Giga Expert

Hi,



I found a solution for this by adding events using Javascript.The code is as below.



var x = document.getElementsByTagName("img");


for (i = 0; i < x.length; i++) {



              if( x[i].title =='Add'){


                add(x[i]); // function call


                }



              if( x[i].title =='Remove'){


                remove(x[i]); // function call


                }


      }



function add(elemm){


elemm.onclick = function() {


alert('Add');



};


}



function remove(elemm) {


elemm.onclick = function() {


alert('Remove');


};


}


View solution in original post

1 REPLY 1

abhiyadav2001
Giga Expert

Hi,



I found a solution for this by adding events using Javascript.The code is as below.



var x = document.getElementsByTagName("img");


for (i = 0; i < x.length; i++) {



              if( x[i].title =='Add'){


                add(x[i]); // function call


                }



              if( x[i].title =='Remove'){


                remove(x[i]); // function call


                }


      }



function add(elemm){


elemm.onclick = function() {


alert('Add');



};


}



function remove(elemm) {


elemm.onclick = function() {


alert('Remove');


};


}