How to allow overlay/pop-up window to display when using \$chat_support.do on CMS

robbin
Kilo Explorer

I added a Service Desk Chat button that's linked to <instance>$chat_support.do?queueID=<sys_id>.   When I click on the link it opens the Service Desk Chat in a new tab window.   I would like for the chat to display as a pop-up on the current screen.

1 ACCEPTED SOLUTION

Manjul Katare
ServiceNow Employee
ServiceNow Employee

Just realized that I had a missing piece (onclick=") in my script.


I've corrected the above script please try one more time.



To see the working page with it, you can try https://demonightlygeneva.service-now.com/ess   before it gets zBooted.You can


You can also see UI Macro here : ServiceNow



Thanks,


Manjul


View solution in original post

8 REPLIES 8

Awesome!!   Thank you Manjul - I really need this to open correctly before we push to PROD.


Manjul Katare
ServiceNow Employee
ServiceNow Employee

Hi Robbin,



You can try this below snippet, it has same approach as OOB, would open the chat window in a popup window. Simply replace your code with below and change the chat queue id.


<?xml version="1.0" encoding="utf-8" ?>


<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">



<!-- Service Desk Chat -->


      <div class="fixed-service-desk-chat">


              <a href="#" onclick="window.open('/$chat_support.do?queueID=c54f0abf0a0a0b452db84664f409c79c', '_blank', 'location=no,toolbar=no,menubar=no,scrollbars=yes,width=760,height=600');">


                      <button class="fixed-chat btn btn-default" id="chat-button">                  


                              <img src="cms-chat-icon.png" width="45" height="35"/>


                              <p class="service-desk-chat-text">Service<br/>Desk Chat</p>


                      </button>


              </a>


      </div>


</j:jelly>




Hope it helps!


-Manjul


Manjul -


I added your script and received the following error message:



Error at line (50) Attribute name "window.open" associated with an element type "a" must be followed by the ' = ' character.




Manjul Katare
ServiceNow Employee
ServiceNow Employee

Just realized that I had a missing piece (onclick=") in my script.


I've corrected the above script please try one more time.



To see the working page with it, you can try https://demonightlygeneva.service-now.com/ess   before it gets zBooted.You can


You can also see UI Macro here : ServiceNow



Thanks,


Manjul