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

Manjul Katare
ServiceNow Employee
ServiceNow Employee

Robbin,


Did you try Dynamic block using GlideDialogWindow ?



Here is a sample, opening an Incident list in a GlideDialogWindow.



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


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


<script>


    function myDialogBox() {


    var dialog = new GlideDialogWindow("incident_list");


    dialog.setTitle("Incident List Window");


    dialog.render(); //Open the dialog


}


</script>


  <a onclick="return myDialogBox();">Show Incidents</a>


</j:jelly>




Hope it helps!


-Manjul


Hi Manjul,



Thanks for the QUICK response!!   🙂



This is what I currently have for my Service Desk Chat feature (see script below). Looking at your script where would I put my code (listed below)?



<?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="/$chat_support.do?queueID=c54f0abf0a0a0b452db84664f409c79c" >


                      <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>


Manjul Katare
ServiceNow Employee
ServiceNow Employee

Try replacing your code with below :



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


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


<script>


    function myDialogBox() {


    var dialog = new GlideDialogWindow("$chat_support.do?queueID=c54f0abf0a0a0b452db84664f409c79c");


    dialog.setTitle("Chat Window");


    dialog.render(); //Open the dialog


}


</script>


<!-- Service Desk Chat -->


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


              <button   onclick="return myDialogBox();" 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>


      </div>


</j:jelly>


Robin, Just realized that GlideDialogWindow does not open Angular based UI pages, since your UI page is "$chat_support", you might have a problem.


Will do some research and get back to you!



-Manjul