I am having difficulties with Live Agent to set it up on a custom third party website that is not connected with force.com. Problem: Whenever i press the button for online talk it popup a new window for chatting with the agent. All i want is to have that window in the same previous window that i had before. Is that possible ? I am sorry if i didn't wrote this topic well. I am new to this :)

Here is my code:

<div id="liveagent_invite_button_57320000000L0oF" style="display:none; position: fixed; border: 2px solid darkblue; border-radius: 5px;
background-color: lightblue; height: 200px; width: 400px;">
<h5>Customer Service</h5>
Hello, and welcome to our customer service page.<br/>
Please click the link to begin a live chat session:<br/>
<img id="liveagent_button_online_57320000000L0oA" style="display: none; border: 0px none; cursor: pointer" target="_top" onclick="liveagent.startChat('57320000000L0oA')" src="https://inplayer.secure.force.com/inplayer/resource/1412841786000/OnlineChatButtonLiveAgent" /><img id="liveagent_button_offline_57320000000L0oA" style="display: none; border: 0px none; " src="https://inplayer.secure.force.com/inplayer/resource/1412841829000/OfflineChatButtonLiveAgent" />
<script type="text/javascript">
if (!window._laq) { window._laq = []; }
window._laq.push(function(){liveagent.showWhenOnline('57320000000L0oA', document.getElementById('liveagent_button_online_57320000000L0oA'));
liveagent.showWhenOffline('57320000000L0oA', document.getElementById('liveagent_button_offline_57320000000L0oA'));

<script type='text/javascript' src='https://c.la2w2.salesforceliveagent.com/content/g/js/31.0/deployment.js'></script>
<script type='text/javascript'>
function buttonCallback(e) {
= '';
document.getElementById('liveagent_invite_button_573x0000000001O').style.left =
document.getElementById('liveagent_invite_button_573x0000000001O').style.top =
document.getElementById('liveagent_invite_button_573x0000000001O').style.display =
if (e == liveagent.BUTTON_EVENT.BUTTON_ACCEPTED) {
document.getElementById('liveagent_invite_button_573x0000000001O').style.display =
if (e == liveagent.BUTTON_EVENT.BUTTON_REJECTED) {
document.getElementById('liveagent_invite_button_573x0000000001O').style.display =
liveagent.addButtonEventHandler('573x0000000001O', buttonCallback);
liveagent.init('https://d.la2w2.salesforceliveagent.com/chat', '57220000000Kzza', 'liveagent_invite_button_57320000000L0oF');

2 Answers 2


Try using the method startChatWithWindow


<script type='text/javascript'>
window.name = "myWindowName";
liveagent.init('https://d.la2cs.salesforceliveagent.com/chat', '57450000000KzGr', '00DR0000001tYzY');

Thank you.

I've already found a solution and made a brand new look on the agent. For future people that don't know how to deal with this , they can find easy modified version on GitHub.

Cheers, D.

  • 4
    Darko, please don't use the answers to comment or add information that does not contain a solution to the question asked above. Would you be able to explain and include how you've solved this problem ? Doing so would turn this into a valid answer and will allow you to accept this anser to indicate the question has been resolved. In result other members from the community may upvote which will increase your reputation. Oct 21, 2014 at 14:29

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .