
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-04-2022 05:31 AM
Hello all,
I could not find information regarding the below issue, hope someone has experience with how to deal with the following:
Virtual Agent is enabled on the instance, it is to be used through the Employee Service Center. The widget is there all right but only until the user searches something in the How can we help? box.
The search results are listed on a new screen but the VA widget disappears at this point and does not get back neither if we hit the Home link nor if we click the go back button on the browser. Only a page reload brings it back.
Any way to prevent this from happening?
Thank you,
Karoly
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-03-2022 09:59 AM
As turned out, the phenomena was caused by the "Request Help Channels" widget - this widget appears by default at the bottom of the page of the search results on the ESC portal. If you have the same problem, disable it or look at its scripts and don't let it add the "display:none;" attribute to the div with "sp-ac-container" class.
Karoly

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-12-2022 11:34 AM
Hello,
My PDI is on Rome and so are all the instances I experience it on.
And I did not see any errors on the console. When I hit enter on the search box, the widget holding DIV got that hiding attribute. When I manually deleted it, everything was all right.
Now I'm thinking to remove that display attribute with a script as workaround; question is where it would work from. I've tried adding something like the below script to the client script of the VA widget. Nothing changed.
(function execute() {
var VAwidgetDiv = document.getElementsByClassName("sp-ac-container");
VAwidgetDiv.setAttribute("display","block");
})();
I've tried adding it to the only editable OOTB widget ("Popular topics"). It does not even load with that script.
Can this be a good direction? The best would be an onLoad script on the portal page maybe but I read that's not possible.
Thank you,
Karoly
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-12-2022 06:28 PM
Hello,
The area you're getting into is known as DOM Manipulation which is generally not recommended but sometimes is required. You are on the right track though, you would wrap the DOM manipulation commands in addAfterPageLoadedEvent in the onLoad client script and the following snippet should work.
function onLoad() {
addAfterPageLoadedEvent(function(){
document.getElementsByClassName("sp-ac-container").style.display = "block";
});
}
Please mark my answer as correct/helpful if it has helped you.
Thanks,
Logan
--
LinkedIn

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-13-2022 01:58 AM
Hi Logan,
Thanks, this should really be the way but it seems the script is not triggered; I created a global client script on the Global table or without a table but the DIV style is not touched.
I even tried this way as in theory getElementsByClassName returns a nodelist object: document.getElementsByClassName("sp-ac-container")[0].style.display = "block";
But no luck. (I even added alerts to see if it runs but did not receive any.)
I also tried to find where the class sp-ac-container is manipulated but found no client script or UI action containing that...
Karoly
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-03-2022 10:06 AM
Very useful

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-03-2022 09:59 AM
As turned out, the phenomena was caused by the "Request Help Channels" widget - this widget appears by default at the bottom of the page of the search results on the ESC portal. If you have the same problem, disable it or look at its scripts and don't let it add the "display:none;" attribute to the div with "sp-ac-container" class.
Karoly