Les sites d’assistance LogMeIn ne prennent plus en charge le navigateur Internet Explorer (IE) de Microsoft. Veuillez utiliser un navigateur compatible pour que toutes les opérations fonctionnent comme prévu (Chrome / FireFox / Edge).

Le site d’assistance GoTo ne prend plus en charge Safari 15. Veuillez mettre à jour votre navigateur vers Safari 16 (ou plus récent) ou passer à un navigateur pris en charge tel que Google Chrome, Mozilla Firefox ou Microsoft Edge.

Voulez-vous ajouter des postes à votre abonnement Rescue ou avoir une démo d’Assistance mobile ou Partage de caméra ? Demander un devis.

We are currently experiencing an unplanned outage for this product. Consulter l’état des services
  • Support
  • Parcourir les produits

    Explorer l’assistance par produit

    GoTo Connect

    Logiciel tout-en-un de téléphonie, de réunion et de messagerie

    GoTo Meeting

    Logiciel de réunion vidéo et audio

    GoTo Webinar

    Logiciel tout-en-un de webinaire et d’événements virtuels

    GoTo Room

    Matériel de salle de réunion

    GoTo Training

    Logiciel de formation en ligne

    OpenVoice

    Logiciel de téléconférence audio

    Grasshopper

    Système téléphonique virtuel léger

    join.me

    Logiciel de visioconférence

    Resolve

    Gestion et assistance informatique

    Resolve MDM

    Gestion des appareils mobiles

    Pro

    Accès à distance aux appareils

    Central

    Surveillance et gestion à distance

    Rescue

    Assistance informatique à distance

    GoToMyPC

    Accès à distance au bureau

    GoToAssist

    Logiciel d’assistance à distance

    Hamachi

    Service de VPN hébergé

    RemotelyAnywhere

    Solution d’accès à distance interne
  • Communauté
  • Formations
  • État du service
  • LogMeIn revient dans la gamme des marques de GoTo

    LogMeIn revient comme nom de nos produits informatiques.

    Lisez l’annonce complète.
    Want to try a download free option?

    Try the new web console experience!

    Rescue WebTC
  • Language selector icon Language selector icon
    • English
    • français
    • italiano
    • Deutsch
    • español
    • português
    • Nederlands
  • Contacter l’assistance
  • État du service
  • User Avatar User Avatar
    • Support
    • Contacter l’assistance
    • Browse Products
    • État du service
    • Communauté
    • Formations
    • Ouvrir une session
    • User Avatar
    • Mon compte
    • Informations personnelles 
    • Connexion et sécurité
    • Centre d'administration
    • Centre de facturation
    • Mon GoTo Connect
    • Mes réunions
    • Mes webinaires
    • Mes formations
    • Mes conférences
    • Mes résolutions
    • My Mobile Devices
    • Mes sessions
    • Mes sessions
    • Mes incidents
    • Fermer la session
  • Personnalisation et intégration
  • Contenu développeur
  • Options de personnalisation pour développeurs
product logo
Back button image Retourner
Back button image
product logo
Sample code for self-hosted Instant Chat

Sample code for self-hosted Instant Chat

Articles related to customization are written for a technical audience who have experience in web development. Knowledge of HTML, CSS, and JavaScript are required.

Voici un exemple de code pour l’hébergement automatique d’Instant Chat.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>YourCompany - Web Chat</title> <script type="text/javascript" src="https://secure.GoToLogMeIn Rescue.com/InstantChat/InstantChat.aspx"></script> <script type="text/javascript"> function loadInstantChat(sessionType) { // Show Instant Chat document.getElementById("InstantChatDiv").style.display = ""; // Hide Channel form document.getElementById("ChannelForm").style.display = "none"; // Hide PIN Code form document.getElementById("PinForm").style.display = "none"; // Hide Language dropdown document.getElementById("LanguageForm").style.display = "none"; var ICLoader = new LogMeIn RescueInstantChatLoader(); ICLoader.ICContainer = "InstantChatDiv"; ICLoader.HostedCSS = "http://YourSite/yourstylesheet.css"; ICLoader.HostedLanguagesForChatOnlyMode = "http://[YourSite]/LanguagesForChatOnlyMode.js"; ICLoader.HostedLanguagesForAppletMode = "http://[YourSite]/LanguagesForAppletMode.js"; // Le nom de domaine ou de URL ou le nom de domaine de [VotreSite] doit être autorisé dans le LogMeIn Rescue Centre d'administration. // Contactez votre LogMeIn Rescue Maître Administrator! // sessionType == 0, nous sommes après REBOOT // Session canal if (sessionType == 1) ICLoader.EntryID = "123456789" ; // Session privée if (sessionType == 2) { var pin = document.getElementById("inputPinCode").value ; if ((pin.length != 6) || isNaN(pin)) { handleError("Private code should be a 6-digit number !") ; return ; } else ICLoader.PrivateCode = document.getElementById("inputPinCode").value ; } ICLoader.Name = document.getElementById("inputYourName").value ; ICLoader.Comment1 = document.getElementById("inputEmailAddress").value ; ICLoader.Comment2 = document.getElementById("inputPhoneNumber").value ; ICLoader.Comment3 = document.getElementById("inputCompanyName").value ; ICLoader.Comment4 = document.getElementById("inputLocation").value ; ICLoader.Comment5 = document.getElementById("inputComment").value ; ICLoader.Tracking0 = "TestForm01" ; ICLoader.Language = document.getElementById("inputLanguageSelect").value ; ICLoader.PostMessageTargetOrigin = null ; //https://[YourSite].com<:443> // Erreur + Aucun technicien disponible gestion de la notification ICLoader.HostedErrorHandler = function(ErrorName) { switch(ErrorName) { case "NOTECHAVAILABLE" : handleError("Aucun technicien n'est actuellement disponible. Veuillez revenir plus tard.") ; break ; case "NOTECHWORKING" : handleError("Désolé, nous sommes fermés. Aucun technicien n'est disponible pour le moment. Veuillez revenir plus tard pendant nos heures d'ouverture.") ; break ; case "INVALID_PARAMETERS" : handleError("Paramètres non valides fournis. Veuillez contacter votre fournisseur d'assistance.") ; break ; case "SESSIONALREADYSTARTED" : handleError("Une session utilisant ce code PIN a déjà été démarrée. Veuillez demander un nouveau code PIN à votre fournisseur de services d'assistance.") ; break ; case "UCONNECTIONERROR" : handleError("Une erreur de connexion inconnue s'est produite.") ; break ; case "ERRNOSUCHSSESSION" : handleError("La session d'assistance ne peut pas être démarrée.") ; break ; case "ERRNOSUCHENTRY" : handleError("La session d'assistance en ligne ne peut pas être démarrée."). Veuillez contacter directement votre fournisseur d'assistance.") ; break ; case "ERRCODEDOESNOTEXIST" : handleError("Le code PIN n'existe pas. Veuillez contacter votre fournisseur d'assistance.") ; break ; case "ERRCODEEXPIRED" : handleError("Le code PIN a expiré. Veuillez contacter votre fournisseur d'assistance.") ; break ; case "ERRNOTEXPIRED" : handleError("Le technicien ou la société n'existe pas. Veuillez contacter votre fournisseur d'assistance.") ; break ; case "ERRMISSINGTECHLICENSE" : handleError("La session d'assistance ne peut pas être démarrée. The technician is not configured to support this type of device."); break; } } ICLoader.Start(); } // Start automatically Instant Chat after REBOOT function handleReboot() { if ((window.location + "").indexOf("LogMeIn Rescuewebsessionid") != -1) loadInstantChat(0); if (window.location.hash.length == webSessionIdLength + 1) loadInstantChat(0); } // Show error messages function handleError(ErrorDescription) { // Hide Instant Chat document.getElementById("InstantChatDiv").style.display = "none"; // Show ErrorForm var ef = document.getElementById("ErrorForm"); ef.style.display = ""; ef.innerHTML = ErrorDescription; } </script> </head> <body onload="handleReboot();" style="background-color: #000000; font-family:tahoma, arial, verdana; color: #FFFFFF"> <noscript> <div style="position: absolute; left: 0px; top: 0px; width: 700px; height: 700px; zindex: 1; background-color: #000000"> To use the Instant Chat feature, please ensure you have JavaScript enabled in your web browser.<br /> Once you have enabled JavaScript, please refresh this page. </div> </noscript> <div id="ChannelForm" style="position: absolute; left: 100px; top: 100px; backgroundcolor: #303030; padding: 20px 20px 20px 20px"> Your Name<br /> <input id="inputYourName" type="text" maxlength="64" style="width: 200px" /><br /> Email Address<br /> <input id="inputEmailAddress" type="text" maxlength="512" style="width: 200px" /><br /> Phone Number<br /> <input id="inputPhoneNumber" type="text" maxlength="512" style="width: 200px" /><br /> Company Name<br /> <input id="inputCompanyName" type="text" maxlength="256" style="width: 200px" /><br /> Location<br /> <input id="inputLocation" type="text" maxlength="64" style="width: 200px" /><br /> Comment<br /> <input id="inputComment" type="text" maxlength="64" style="width: 200px" /><br /><br /> <input type="button" value="Start Chat Now" onclick="loadInstantChat(1);" /> </div> <div id="PinForm" style="position: absolute; left: 400px; top: 100px; background-color: #303030; padding: 20px 20px 20px 20px"> Enter your 6 digit PIN code<br /> <input id="inputPinCode" type="text" maxlength="64" style="width: 200px" /><br /><br /> <input type="button" value="Connect to technician" onclick="loadInstantChat(2);" /> </div> <div id="LanguageForm" style="position: absolute; left: 400px; top: 260px; backgroundcolor: #303030; padding: 20px 20px 20px 20px"> Select Chat<br />interface language<br /> <select id="inputLanguageSelect" style="width: 200px"> <option value="en">English</option> <option value="es">Español</option> <option value="de">Deutsch</option> <option value="fr">Français</option> <option value="it">Italiano</option> <option value="nl">Nederlands</option> <option value="pt">Português</option> <option value="pt-br">Português (Br)</option> <option value="hu">Magyar</option> <option value="ru">Russian</option> <option value="ja">Japanese</option> <option value="ko">Korean</option> <option value="zh">Simplified Chinese</option> <option value="zh-tw">Traditional Chinese</option> <option value="ar">Arabic </option <option value="tr">Türk</option> <option value="pl">Polski</option> <option value="fi">Suomalainen</option> <option value="sv">Svensk</option> <option value="no">Norsk</option> <option value="he">Hebrew</option> <option value="da">Dansk</option> <option value="cs">Czech</option> </select> </div> <div id="ErrorForm" style="position: absolute; left: 100px; top: 100px; height: 200px; width: 300px; background-color: #303030; padding: 20px 20px 20px 20px; display: none"></div> <div id="InstantChatDiv" style="position: absolute; left: 100px; top: 100px; width: 285px; height: 259px; display: none"></div> </body> </html>
Note:
  • Instant Chat utilise toujours le type de document XHTML 1.0 Transitional, bien que d’anciens types de documents HTML soient également pris en charge.
  • La ligne suivante doit toujours pointer vers ChatChat.aspx:
    <script type="text/javascript"src="https://secure.GoToLogMeIn Rescue.com/InstantChat/InstantChat.aspx"></script>
  • ICContainer est un paramètre obligatoire, l'iframe Instant Chat sera chargé dans l'élément ICContainer:
    ICLoader.ICContainer = "ICContainer" ;
  • Pour en savoir plus sur la personnalisation de l'InstantChat.css, voir Customize InstantChat.css.
  • Vous pouvez définir un paramètre PrivateCode au lieu du paramètre EntryID pour démarrer des sessions privées dans
    ICLoader.EntryID = "1234567890" ;
  • Vous pouvez définir le code de la langue par défaut (« en » par défaut). Voir également Customize Instant Chat language files.

    Les langues suivantes sont prises en charge par GoTo :

    Abréviation (valeur) Langue Abréviation (valeur) Langue
    en Anglais zh Chinois simplifié
    fr Espagnol zh-tw Chinois traditionnel
    de Allemand ar Arabe
    fr Français tr Turc
    it Italien pl Polonais
    nl Néerlandais fi Finnois
    pt Portugais sv Suédois
    pt-br Portugais (Brésil) no Norvégien
    hu Hongrois he Hébreu
    ru Russe da Danois
    ja Japonais cs Tchèque
    ko Coréen el Grec
    th Thaï ro Roumain
    bg Bulgare sk Slovaque
    hr Croate    
  • La gestion des erreurs en mode hébergé fonctionne comme suit :
    • Supprimez le handleRedémarrer fonction si votre ICContainer est toujours visible sur votre page:
      function handleReboot(){...}
    • Affiche automatiquement Instant Chat après le redémarrage. Supprimez cette ligne si votre ICContainer est toujours visible sur votre page:
      if ((window.location + "").indexOf("LogMeIn Rescuewebsessionid") != - 1){document.getElementById(")ICContainer").style.display="" ; loadInstantChat();} /* facultatif */
Article last updated: 11 July, 2023
You are viewing the latest version of this article.

Besoin d’aide ?

Contact icon Contacter l’assistance
Community icon Demander à la communauté
Training icon Attend trainings
Video icon Participer à des formations
  • Language selector icon Language selector icon
    • English
    • français
    • italiano
    • Deutsch
    • español
    • português
    • Nederlands
  • À propos de nous
  • Conditions d'utilisation
  • Politique de confidentialité
  • Marque déposée
  • Ne pas vendre ni partager mes Données Personnelles
  • Parcourir les produits
  • Copyright © 2025 GoTo Group, Inc. All rights reserved

Communication et collaboration

GoTo Connect

GoTo Meeting

GoTo Webinar

GoTo Training

join.me

Grasshopper

OpenVoice

Contact et assistance

GoTo Resolve

Rescue

GoToAssist

Identité et accès

Pro

Central

GoToMyPC