Quantcast
Channel: LivePerson Connect : Popular Discussions - All Communities
Viewing all articles
Browse latest Browse all 2324

lpconnlib is undefined

$
0
0

Hi,

    If i press F5 (a couple times)on my chat window then i get the "lpconnlib undefine" error. i took the Chat Api for Javascript sample and modified a little.

 

lpConnLib.Process({"ResultSet": {"lpCallId":"997452286610-1641881088","lpCallError":"Chat key cookie does not match visitor chat key"}});

 

 

     I modified to make it auto request:

 

lpChatConfig.lpAddScript =

function (src, ignore) { var c = lpChatConfig; if (typeof (c.lpProtocol) == 'undefined') { c.lpProtocol = (document.location.toString().indexOf("https:") == 0) ? "https" : "http"; } if (typeof (src) == 'undefined' || typeof (src) == 'object') { src = c.lpChatSrc ? c.lpChatSrc : '/hcp/html/lpChatAPI.js'; }; if (src.indexOf('http') != 0) { src = c.lpProtocol + "://" + c.lpServer + src + '?site=' + c.lpNumber; } else { if (src.indexOf('site=') < 0) { if (src.indexOf('?') < 0) src = src + '?'; else src = src + '&'; src = src + 'site=' + c.lpNumber; } }; return src; }

 

$(document).ready(

function () {

 

var src = lpChatConfig.lpAddScript();

$.getScript(src,

function (data, textStatus) {

lpc.requestChat();

});

});

 

 

Thanks,

Hoay


Viewing all articles
Browse latest Browse all 2324

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>