watsonx Assistant

 View Only
  • 1.  Plus Plan Webchat widget on Internet Explorer

    Posted Wed October 07, 2020 11:04 AM
    Hi,
    Is Internet Explorer still supported for the webchat widget? I'm referring to the one you can configure and deploy in Watson Assistant using just a JavaScript snippet.
    We can't get it to work from several different devices.
    Reading the documentation it seems it should work:

    "Web chat supports a wide variety of devices and platforms. As a rule, if the last two versions of a browser account for more than 1% of all desktop or mobile traffic, web chat supports that browser.

    Like on most mobile web sites, our mobile support requires you to have <meta name="viewport" content="width=device-width, initial-scale=1"></meta> set in your <head> element for optimal results.

    Web chat supports the following browsers (including the two most recent versions, except as noted):

    • Chrome
    • Safari
    • Mobile Safari
    • Chrome for Android
    • Internet Explorer 11 (most recent version only)
    • Edge (Chromium and non-Chromium)
    • Firefox
    • Firefox ESR (most recent ESR only)
    • Opera
    • Samsung Mobile Browser
    • UC Browser for Android
    • Mobile Firefox"
    Any help appreciated.
    Thanks,
    Declan

    #WatsonAssistant


  • 2.  RE: Plus Plan Webchat widget on Internet Explorer

    Posted Thu October 08, 2020 01:46 AM

    Yes it should be working fine. Does it work from other browsers on these devices? 

    Can you share a screenshot of what is not working?



    ------------------------------
    Mitch Mason
    ------------------------------



  • 3.  RE: Plus Plan Webchat widget on Internet Explorer

    Posted Thu October 08, 2020 04:18 AM
    Hi Mitch,
    It works fine on all devices for other browsers, Chrome, Edge (With "strict" mode turned off), Firefox, Opera and mobile browsers.
    It's running on a WPEngine server. The page is also loading hotjar for analytics. The error thrown in the console is just "syntax error" with the last line in the page, nothing appears at all.
     So there's no screenshot available.
    Thanks,
    Declan

    #WatsonAssistant


  • 4.  RE: Plus Plan Webchat widget on Internet Explorer

    Posted Fri October 09, 2020 10:07 AM
    I just tested on another web chat instance, and it worked fine on IE. Can you clarify which version of IE you're on? Also, if you can copy and paste the syntax error that might help clarify.

    ------------------------------
    Mitch Mason
    ------------------------------



  • 5.  RE: Plus Plan Webchat widget on Internet Explorer

    Posted Fri October 09, 2020 10:18 AM
    Edited by System Fri January 20, 2023 04:43 PM
    Hi Mitch,
    In that case it must be something specific to that webpage. 
    This is the link to their deployed (beta) site:
    "Removed at Clients request"
    The error doesn't give any hint, I'm pretty sure something is blocking the rendering somehow.
    SCRIPT1002: Syntax error: "Removed at Clients request" (1944,41)   - that's the last line of the html on that page.
    Thanks for your help.
    Declan

    #WatsonAssistant


  • 6.  RE: Plus Plan Webchat widget on Internet Explorer

    Posted Sun October 11, 2020 08:27 AM
    Hi Mitch,
    I did some experiments and found this issue, but I'm unsure exactly what's causing it.
    Below are two ways of loading the chatbot interface, the first does not work on IE but runs fine everywhere else.

    We used this first code snippet to load the chatbot, which does not load in EI:

    <script src="https://web-chat.global.assistant.watson.cloud.ibm.com/loadWatsonAssistantChat.js"></script>
    <script>
    const options = {
    integrationID: 'ID',
    region: 'eu-de',
    serviceInstanceID: "ID", 
    showLauncher: false
    };
    window.loadWatsonAssistantChat(options).then(function(instance){
    const button = document.querySelector('.chatLauncher');
    button.addEventListener('click', () => {
    instance.openWindow();
    });
    instance.updateCSSVariables({
    'BASE-z-index': '2147483650',
    '$focus': '#ff0000',
    '$overlay-01': '#ffffff'
    });

    instance.render().then(() => {
    button.style.display = 'block';
    button.classList.add('open');
    });
    });
    </script>


    This second (default) way of loading does work in IE:

    <script>
    window.watsonAssistantChatOptions = {
    integrationID: 'ID',
    region: 'eu-de',
    serviceInstanceID: "id", 
    //showLauncher: false
    onLoad: function(instance) { instance.render(); }
    };
    setTimeout(function(){
    const t=document.createElement('script');
    t.src="https://web-chat.global.assistant.watson.appdomain.cloud/loadWatsonAssistantChat.js";
    document.head.appendChild(t);
    });
    </script>

    I've no idea what particular part is causing this.
    Thanks,
    Declan

    #WatsonAssistant


  • 7.  RE: Plus Plan Webchat widget on Internet Explorer

    Posted Mon October 12, 2020 09:37 AM
    The example code for a custom launcher uses arrow functions like...
    () => { button.style.display = 'block'; button.classList.add('open'); });​


    IE 11 doesn't support arrow functions.

    You need to change it over to using a regular function like 

    function openChat() { button.style.display = 'block'; button.classList.add('open'); }

    ------------------------------
    ETHAN WINTERS
    ------------------------------



  • 8.  RE: Plus Plan Webchat widget on Internet Explorer

    Posted Mon October 12, 2020 09:38 AM
    IE11 does not support arrow functions

    () => { // do something }​


    To support IE11, you need to just use regular functions. There are some examples in the documentation that uses modern syntax like arrow functions, but if you want to support IE11 with your custom code it needs to be IE11 syntax.



    ------------------------------
    ETHAN WINTERS
    ------------------------------



  • 9.  RE: Plus Plan Webchat widget on Internet Explorer

    Posted Mon October 12, 2020 11:07 AM
    Thanks Ethan - All makes sense now.
    Regards,
    Declan

    #WatsonAssistant