Is it possible to start the chat but without opening new window? I would like to have the chat inside a div on existing page. I don't want pre chat forms or anything like that. Just start the chat inside existing page. I'm using Deployment API to setup and initiate chat.

  • i'm very interested in achieving the same. Would you mind sharing the URL address where your chat is available, so i could show an example of the implementation?
    – user26560
    Nov 23 '15 at 10:07
  • @Anni I can't. The Salesforce chat component is a piece of crap and the company migrated to a dedicated chat provided that does things properly. Nov 23 '15 at 13:52

Yes it is possible to do so by using "startChatWithWindow()" from the Live Agent API. By passing in the name of an iFrame it will open up the chat within the iFrame instead of a new window.

The documentation can be found below.


  • I'd call this an undocumented feature. The docs clearly say about window name. Mar 5 '15 at 10:37
  • @Patriot, what do you as the name of the iframe? I was thinking it's id, but that doesn't seem to be working for me.
    – Tall Paul
    May 29 '15 at 13:52
  • 1
    @TallPaul for some browsers you need to set iframe name AND id attributes. May 29 '15 at 14:18
  • @SiliconMind thanks for that, I got it to work now!
    – Tall Paul
    May 29 '15 at 14:21
  • does this have to be an iframe? I tried it with a div, but it just popped up. I did get it to work with the iframe, but prefer to div
    – garek007
    Jan 11 '19 at 15:39

this should probably work. include this in <a.../a> tag

onclick="liveagent.startChatWithWindow('xxxxxxxxxxxxx'  ,  'name_of_your_iframe')"

If using iFrame is not ideal (not mobile friendly), in the same page file, give it a window name first.

<script type="text/javascript">
window.name = 'chatchat'

Open the chat or pre-chat form within the same window.


Now have a new feature name Embedded chat service you can use live chat without pop-up in a new window. And there is trail modules too.



Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.