We know that we can override the default behavior of take action button in a fixlet- Well we need to do it and we have done it as well . After we override the take action button the “take action Dialog” popups which allows us to select the target computer. The question is We already know our target which we collected from user input before hand . Is there a way to avoid the Take Action popup so that user dont have to select the target computer again ?
Thanks for you reply. Its pity that it can not be done from fixlet. I have one more question lets say we are on dash board and we want to run action script by any mean ( one of which could be by creating fixlet ) but for the time being ignore that how it will be done. We want to run action script but still we dont want to see the Take Action dialog is there any way. I know ImportXML API can not be useful but it is also showing the Take Action dialog for my action script.
Thanks for your reply. I think we can click on the take action button from fixlet and still can avoid the take action dialog . Please see how
// Function allows us to override the functionality of Default take action
//button
document.body.ontakeaction = function (event) {
return false;
}
Now inside the body of this function we can write our own code and use ImportXML from adf. ( we can use adf in fixlet ,so that is sorted)
The question: We need to pass the parameter to the fixlet action. Yes, our fixlet accept the parameter from user. We need to pass the parameter in such a way fixle should not prompt for it.
one of the way of doing this is to use the function
TakeFixletAction( EvaluateRelevance(‘id of current fixlet’),
0xffffffff & Relevance(‘id of bes site whose (name of it is “ActionSite”)’),‘Action1’ , jsonParamsObj,
function (id) { alert('Took an action with id ’ + id); } );
please see the jsonParamsObj , This object is the one which has parameter name and value and stops the fixlet pop up box for collectig parameter when take action button is clicked.
The problem using this function it brigns the take action dialog. What we want to do is to inject the parameter values in XML . The XML you pasted in your reply does not suggest any suitable location ( or it can not find it )
I will appreciate if you know the name of the tag which can hold the parameter value. Please let me know if i am no clear in explaining.