Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| vendors:cisco:uc:ece:js [2021/05/25 10:07] – created gerardorourke | vendors:cisco:uc:ece:js [2021/05/25 10:09] (current) – gerardorourke | ||
|---|---|---|---|
| Line 4: | Line 4: | ||
| /* Create a new instance of the eGainLibrarySettings Object */ | /* Create a new instance of the eGainLibrarySettings Object */ | ||
| var librarySettings = new eGainLibrarySettings(); | var librarySettings = new eGainLibrarySettings(); | ||
| - | librarySettings.CORSHost =”http:// | + | librarySettings.CORSHost ="http:// |
| librarySettings.IsDevelopmentModeOn = false; | librarySettings.IsDevelopmentModeOn = false; | ||
| ibrarySettings.eGainContextPath = ""; | ibrarySettings.eGainContextPath = ""; | ||
| - | librarySettings.ChatPauseInSec = “30"; | + | librarySettings.ChatPauseInSec = "30"; |
| librarySettings.IsDebugOn = false; | librarySettings.IsDebugOn = false; | ||
| /* Next create a new instance of the eGainLibrary */ | /* Next create a new instance of the eGainLibrary */ | ||
| Line 22: | Line 22: | ||
| | | ||
| }; | }; | ||
| - | + | /* Example browser alert when there is a connection failure */ | |
| - | /* Example browser alert when there is a connection failure */ | + | |
| - | myEventHandlers.OnConnectionFailure = function () { | + | |
| - | alert(' | + | }; |
| - | }; | + | |
| /* Example browser alert when there is an error during chat */ | /* Example browser alert when there is an error during chat */ | ||
| | | ||
| Line 33: | Line 31: | ||
| }; | }; | ||
| - | /* Example output of agent messages to a DIV named TransScript with jQuery */ | + | /* Example output of agent messages to a DIV named TransScript with |
| - | myEventHandlers.OnAgentMessageReceived = function(agentMessageReceivedEventArgs) { | + | jQuery */ |
| - | $('# | + | |
| - | }; | + | (agentMessageReceivedEventArgs) { |
| + | | ||
| + | agentMessageReceivedEventArgs.Message); | ||
| + | }; | ||
| - | /* Example output of system messages to the same DIV */ | + | /* Example output of system messages to the same DIV */ |
| - | myEventHandlers.OnSystemMessageReceived = function(systemMessageReceivedEventArgs) { | + | |
| - | $('# | + | (systemMessageReceivedEventArgs) { |
| - | }; | + | |
| + | systemMessageReceivedEventArgs.Message); | ||
| + | }; | ||
| - | /* Example browser alert when agents are not available */ | + | /* Example browser alert when agents are not available */ |
| - | myEventHandlers.OnAgentsNotAvailable = function(agentsNotAvailableEventArgs) { | + | |
| - | alert(' | + | (agentsNotAvailableEventArgs) { |
| - | }; | + | |
| + | }; | ||
| - | /* Example browser alert when the chat is completed */ | + | /* Example browser alert when the chat is completed */ |
| - | myEventHandlers.OnConnectionComplete = function () { | + | |
| - | $.mobile.changePage("# | + | |
| - | }; | + | }; |
| /* Now call the Chat initialization method with your entry point and callbacks */ | /* Now call the Chat initialization method with your entry point and callbacks */ | ||