FireFox”;窗口_laq未定义”;错误适用于Chrome和IE

FireFox "window._laq is undefined" Error.. works in Chrome and IE

本文关键字:适用于 Chrome IE 错误 laq 窗口 FireFox 未定义      更新时间:2023-09-26

我有一些代码可以在Chrome和IE中弹出聊天窗口,但不能在FireFox中使用。-FireFox错误"TypeError:window_laq未定义"

JS代码:

<script type="text/javascript">
  if (!window._laq) { window._laq = []; }
  window._laq.push(function(){chat.showWhenOnline('123123', document.getElementById('chat_button_online_123123'));
  chat.showWhenOffline('123123', document.getElementById('chat_button_offline_123123'));
  });
</script>

它是通过单击图像按钮来调用的。。代码:

<a class="chaticon" id="chat_button_online_123123" 
onclick="chat.startChat('123123')">
<img src="http://myDomain.com/chatIcon_on.jpg" border="0" alt="Need Help? Live Chat!" />
</a>

有什么想法吗?

谢谢/Shane

您必须插入

<script type='text/javascript' src='https://c.la1-c1cs-lon.salesforceliveagent.com/content/g/js/34.0/deployment.js'></script> 

在脚本之前。这样,系统应该能够识别命令窗口_laq。