- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-16-2014 02:56 AM
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
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-16-2014 05:42 AM
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');
};
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-16-2014 05:42 AM
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');
};
}